MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / read_number

Function read_number

lua/liolib.c:281–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279
280
281static int read_number (lua_State *L, FILE *f) {
282 lua_Number d;
283 if (fscanf(f, LUA_NUMBER_SCAN, &d) == 1) {
284 lua_pushnumber(L, d);
285 return 1;
286 }
287 else return 0; /* read fails */
288}
289
290
291static int test_eof (lua_State *L, FILE *f) {

Callers 1

g_readFunction · 0.85

Calls 1

lua_pushnumberFunction · 0.85

Tested by

no test coverage detected