diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-10-23 17:16:17 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-10-23 17:16:17 -0300 |
commit | e3ce88c9e850b7e79751083014699c5eae1bff31 (patch) | |
tree | e73392a16c560ed532ef2238132f0e58d2eb23b3 /lua.h | |
parent | 5ffcd458f001fce02e5f20a6130e145c6a3caf53 (diff) | |
download | lua-e3ce88c9e850b7e79751083014699c5eae1bff31.tar.gz lua-e3ce88c9e850b7e79751083014699c5eae1bff31.tar.bz2 lua-e3ce88c9e850b7e79751083014699c5eae1bff31.zip |
New function 'lua_numbertostrbuff'
It converts a Lua number to a string in a buffer, without creating
a new Lua string.
Diffstat (limited to 'lua.h')
-rw-r--r-- | lua.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -371,7 +371,9 @@ LUA_API int (lua_next) (lua_State *L, int idx); | |||
371 | LUA_API void (lua_concat) (lua_State *L, int n); | 371 | LUA_API void (lua_concat) (lua_State *L, int n); |
372 | LUA_API void (lua_len) (lua_State *L, int idx); | 372 | LUA_API void (lua_len) (lua_State *L, int idx); |
373 | 373 | ||
374 | LUA_API size_t (lua_stringtonumber) (lua_State *L, const char *s); | 374 | #define LUA_N2SBUFFSZ 64 |
375 | LUA_API unsigned (lua_numbertostrbuff) (lua_State *L, int idx, char *buff); | ||
376 | LUA_API size_t (lua_stringtonumber) (lua_State *L, const char *s); | ||
375 | 377 | ||
376 | LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud); | 378 | LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud); |
377 | LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud); | 379 | LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud); |