String buffers, part 1: object serialization.

Sponsored by fmad.io.
This commit is contained in:
Mike Pall
2021-03-25 02:21:31 +01:00
parent 836fb5bbd3
commit 4c6b669c41
26 changed files with 797 additions and 18 deletions

21
src/lj_serialize.h Normal file
View File

@@ -0,0 +1,21 @@
/*
** Object de/serialization.
** Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
*/
#ifndef _LJ_SERIALIZE_H
#define _LJ_SERIALIZE_H
#include "lj_obj.h"
#include "lj_buf.h"
#if LJ_HASBUFFER
#define LJ_SERIALIZE_DEPTH 100 /* Default depth. */
LJ_FUNC StrBuf * LJ_FASTCALL lj_serialize_put(StrBuf *sb, cTValue *o);
LJ_FUNC StrBuf * LJ_FASTCALL lj_serialize_get(StrBuf *sb, TValue *o);
#endif
#endif