aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeterminant <tederminant@gmail.com>2019-06-07 22:35:27 -0400
committerDeterminant <tederminant@gmail.com>2019-06-07 22:35:27 -0400
commit0f3b3ed832db7062c805e82a9605b777595e340c (patch)
tree074d79efebf48f668a37af29513a6102e06cc051
parentf7050c145e81a70be85bb0287044abdfa7ba444f (diff)
...
-rw-r--r--include/salticidae/event.h2
-rw-r--r--include/salticidae/stream.h2
-rw-r--r--src/stream.cpp5
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(); }