lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


void lua_pushsnumber( lua_State *L, const char *s );

Converts *s to a number and places it on the stack. If the number 
cannot be cleanly converted Nil is placed on the stack instead. 

Bascially I have a lot of C strings that may contain text or a number 
as text. (I know which ones are which) and it would be much more 
convient just to run though going lua_pushlstring, lua_pushsnumber. 
This way I can ensure that I use the same string to number conversion 
routines as lua.