Skip to content
Snippets Groups Projects
Commit a9f45664 authored by Roman Tsisyk's avatar Roman Tsisyk
Browse files

Add pack_uXX methods to pickle.h

parent 8a6400f5
No related branches found
No related tags found
No related merge requests found
......@@ -228,4 +228,17 @@ pack_lstr(char *buf, const void *str, uint32_t len)
return (char *) memcpy(pack_varint32(buf, len), str, len) + len;
}
#define pack_u(bits) \
static inline char * \
pack_u##bits(char *buf, uint##bits##_t val) \
{ \
*(uint##bits##_t *) buf = val; \
return buf + sizeof(uint##bits##_t); \
}
pack_u(8)
pack_u(16)
pack_u(32)
pack_u(64)
#endif /* TARANTOOL_PICKLE_H_INCLUDED */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment