1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-30 23:23:07 +00:00

Fix serilaization bug. Still need to serialize c functions.

This commit is contained in:
Calvin Rose
2017-05-23 14:48:54 -04:00
parent 145688b49f
commit f066047112
7 changed files with 36 additions and 41 deletions

View File

@@ -352,7 +352,7 @@ const uint8_t *gst_buffer_to_string(Gst *vm, GstBuffer *buffer);
/* Define a push function for pushing a certain type to the buffer */
#define BUFFER_DEFINE(name, type) \
static void gst_buffer_push_##name(Gst * vm, GstBuffer * buffer, type x) { \
static void gst_buffer_push_##name(Gst *vm, GstBuffer *buffer, type x) { \
union { type t; uint8_t bytes[sizeof(type)]; } u; \
u.t = x; gst_buffer_append(vm, buffer, u.bytes, sizeof(type)); \
}