MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / read_number

Function read_number

third-party/lua-5.2.4/src/liolib.c:350–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348
349
350static int read_number (lua_State *L, FILE *f) {
351 lua_Number d;
352 if (fscanf(f, LUA_NUMBER_SCAN, &d) == 1) {
353 lua_pushnumber(L, d);
354 return 1;
355 }
356 else {
357 lua_pushnil(L); /* "result" to be removed */
358 return 0; /* read fails */
359 }
360}
361
362
363static int test_eof (lua_State *L, FILE *f) {

Callers 1

g_readFunction · 0.70

Calls 2

lua_pushnumberFunction · 0.70
lua_pushnilFunction · 0.70

Tested by

no test coverage detected