commit bce6f29cab15897a31d9e0a19199634bcbdbf9cf
parent ac37c9ab03f26f639e1fc78cf29c6cab9cc65890
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date: Thu, 10 Mar 2022 18:16:28 +0100
Make the stream const
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/clap/ext/state.h b/include/clap/ext/state.h
@@ -13,12 +13,12 @@ typedef struct clap_plugin_state {
// Saves the plugin state into stream.
// Returns true if the state was correctly saved.
// [main-thread]
- bool (*save)(const clap_plugin_t *plugin, clap_ostream_t *stream);
+ bool (*save)(const clap_plugin_t *plugin, const clap_ostream_t *stream);
// Loads the plugin state from stream.
// Returns true if the state was correctly restored.
// [main-thread]
- bool (*load)(const clap_plugin_t *plugin, clap_istream_t *stream);
+ bool (*load)(const clap_plugin_t *plugin, const clap_istream_t *stream);
} clap_plugin_state_t;
typedef struct clap_host_state {
diff --git a/include/clap/stream.h b/include/clap/stream.h
@@ -13,7 +13,7 @@ typedef struct clap_istream {
/* returns the number of bytes read.
* 0 for end of file.
* -1 on error. */
- int64_t (*read)(struct clap_istream *stream, void *buffer, uint64_t size);
+ int64_t (*read)(const struct clap_istream *stream, void *buffer, uint64_t size);
} clap_istream_t;
typedef struct clap_ostream {
@@ -21,7 +21,7 @@ typedef struct clap_ostream {
/* returns the number of bytes written.
* -1 on error. */
- int64_t (*write)(struct clap_ostream *stream, const void *buffer, uint64_t size);
+ int64_t (*write)(const struct clap_ostream *stream, const void *buffer, uint64_t size);
} clap_ostream_t;
#ifdef __cplusplus