Commit f6fa4fe1 authored by Arnaud Blanchard's avatar Arnaud Blanchard

Function to delete a channel

parent 8200ac8f
......@@ -155,8 +155,9 @@ typedef struct blc_channel
Dims_nb is the number of dimenssions of the data ( 1 for a vector).
The following values are the the length of each dims. You must have the same number of length than dims_nb*/
blc_channel* blc_channel_new( const char *name, int mode, uint32_t type, uint32_t format, int dims_nb, int length0, ...);
blc_channel *blc_channel_new( const char *name, int mode, uint32_t type, uint32_t format, int dims_nb, int length0, ...);
void blc_channel_delete(blc_channel *channel);
void *blc_channel_get_data(blc_channel *channel);
......@@ -177,7 +178,6 @@ typedef struct blc_channel
void blc_remove_channel_with_name(char const *name);
void blc_channel_post_event();
void blc_channel_check_for_event(void (*callback)(void*user_data), void *user_data);
......
......@@ -62,6 +62,12 @@ blc_channel *blc_channel_new(char const *name, int mode, uint32_t type, uint32_
return channel;
}
// This is especially for binding to external langage (e.g. python)
// Delete the channel. This is different from destroy which deinits the channel but does not remove the memory.
void blc_channel_delete(blc_channel *channel){
delete channel;
}
void *blc_channel_get_data(blc_channel *channel){
return channel->data;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment