diff options
-rw-r--r-- | include/salticidae/event.h | 2 | ||||
-rw-r--r-- | include/salticidae/stream.h | 2 | ||||
-rw-r--r-- | src/stream.cpp | 5 |
3 files changed, 5 insertions, 4 deletions
diff --git a/include/salticidae/event.h b/include/salticidae/event.h index ae46e78..5b44027 100644 --- a/include/salticidae/event.h +++ b/include/salticidae/event.h @@ -670,7 +670,7 @@ void eventcontext_dispatch(eventcontext_t *self); void eventcontext_stop(eventcontext_t *self); typedef void (*sigev_callback_t)(int events); -sigev_t *sigev_new(const eventcontext_t *self, sigev_callback_t cb); +sigev_t *sigev_new(const eventcontext_t *ec, sigev_callback_t cb); void sigev_free(sigev_t *self); void sigev_add(sigev_t *self, int sig); diff --git a/include/salticidae/stream.h b/include/salticidae/stream.h index 95c2ccb..9b676a6 100644 --- a/include/salticidae/stream.h +++ b/include/salticidae/stream.h @@ -506,7 +506,7 @@ datastream_t *datastream_new_from_bytes(const uint8_t *begin, const uint8_t *end void datastream_free(const datastream_t *self); void datastream_assign_by_copy(datastream_t *dst, const datastream_t *src); -void datastream_assign_by_move(datastream_t *dst, datastream_t *src); +void datastream_assign_by_move(datastream_t *dst, datastream_t *_moved_src); uint8_t *datastream_data(datastream_t *self); void datastream_clear(datastream_t *self); size_t datastream_size(const datastream_t *self); diff --git a/src/stream.cpp b/src/stream.cpp index 1925419..9dfe5fc 100644 --- a/src/stream.cpp +++ b/src/stream.cpp @@ -33,8 +33,9 @@ void datastream_assign_by_copy(datastream_t *dst, const datastream_t *src) { *dst = *src; } -void datastream_assign_by_move(datastream_t *dst, datastream_t *src) { - *dst = std::move(*src); +void datastream_assign_by_move(datastream_t *dst, datastream_t *_moved_src) { + *dst = std::move(*_moved_src); + delete _moved_src; } uint8_t *datastream_data(datastream_t *self) { return self->data(); } |