From 0f3b3ed832db7062c805e82a9605b777595e340c Mon Sep 17 00:00:00 2001 From: Determinant Date: Fri, 7 Jun 2019 22:35:27 -0400 Subject: ... --- include/salticidae/event.h | 2 +- include/salticidae/stream.h | 2 +- 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(); } -- cgit v1.2.3-70-g09d2