aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/stream.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/stream.cpp b/src/stream.cpp
index 9ad41aa..3e24292 100644
--- a/src/stream.cpp
+++ b/src/stream.cpp
@@ -83,6 +83,14 @@ bytearray_t *bytearray_new_moved_from_datastream(datastream_t *_moved_src) {
return res;
}
+char *datastream_get_hex(datastream_t *self) {
+ std::string tmp = self->get_hex();
+ auto res = (char *)malloc(tmp.length() + 1);
+ memmove(res, tmp.c_str(), tmp.length());
+ res[tmp.length()] = 0;
+ return res;
+}
+
}
#endif