aboutsummaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-10-23 17:16:17 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-10-23 17:16:17 -0300
commite3ce88c9e850b7e79751083014699c5eae1bff31 (patch)
treee73392a16c560ed532ef2238132f0e58d2eb23b3 /lua.h
parent5ffcd458f001fce02e5f20a6130e145c6a3caf53 (diff)
downloadlua-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.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lua.h b/lua.h
index dcf49264..5fbc9d34 100644
--- a/lua.h
+++ b/lua.h
@@ -371,7 +371,9 @@ LUA_API int (lua_next) (lua_State *L, int idx);
371LUA_API void (lua_concat) (lua_State *L, int n); 371LUA_API void (lua_concat) (lua_State *L, int n);
372LUA_API void (lua_len) (lua_State *L, int idx); 372LUA_API void (lua_len) (lua_State *L, int idx);
373 373
374LUA_API size_t (lua_stringtonumber) (lua_State *L, const char *s); 374#define LUA_N2SBUFFSZ 64
375LUA_API unsigned (lua_numbertostrbuff) (lua_State *L, int idx, char *buff);
376LUA_API size_t (lua_stringtonumber) (lua_State *L, const char *s);
375 377
376LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud); 378LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud);
377LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud); 379LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud);