| 1 | |
|---|---|
| 2 | #ifndef LUA53_LSTRLIB_H |
| 3 | #define LUA53_LSTRLIB_H |
| 4 | |
| 5 | #ifdef __cplusplus |
| 6 | extern "C"{ |
| 7 | #endif |
| 8 | |
| 9 | #include "lua.h" |
| 10 | |
| 11 | typedef struct luaL_Buffer_53 { |
| 12 | luaL_Buffer b; /* make incorrect code crash! */ |
| 13 | char *ptr; |
| 14 | size_t nelems; |
| 15 | size_t capacity; |
| 16 | lua_State *L2; |
| 17 | } luaL_Buffer_53; |
| 18 | |
| 19 | void lua53_pushresult (luaL_Buffer_53 *B); |
| 20 | void lua53_cleanupbuffer (luaL_Buffer_53 *B); |
| 21 | |
| 22 | void lua53_str_pack (lua_State *L, const char *fmt, int startidx, luaL_Buffer_53 *b); |
| 23 | int lua53_str_packsize (lua_State *L); |
| 24 | int lua53_str_unpack (lua_State *L, const char *fmt, const char *data, size_t ld, int dataidx, int posidx); |
| 25 | |
| 26 | #ifdef __cplusplus |
| 27 | } |
| 28 | #endif |
| 29 | |
| 30 | #endif /* LUA53_LSTRLIB_H */ |
| 31 |