src/ravi_jit.c
static bool l_table_get_integer(lua_State *L, int tab, const char *key,
                                lua_Integer *result,
                                lua_Integer default_value) {
  bool rc = false;
  lua_pushstring(L, key);
  lua_gettable(L, tab); /* get table[key] */
  if (!lua_isnumber(L, -1))
    *result = default_value;
  else {
    *result = lua_tointeger(L, -1);
    rc = true;
  }
  lua_pop(L, 1); /* remove number */
  return rc;
}
// Utility to extract a integer field from a table
Utility to extract a integer field from a table
Utility to extract a integer field from a table
static bool l_table_get_integer(lua_State *L, int tab, const char *key,
                                lua_Integer *result,
                                lua_Integer default_value) {
  bool rc = false;
  lua_pushstring(L, key);
  lua_gettable(L, tab); 
  if (!lua_isnumber(L, -1))
    *result = default_value;
  else {
    *result = lua_tointeger(L, -1);
    rc = true;
  }
  lua_pop(L, 1); 
  return rc;
}
static bool l_table_get_integer ( lua_State * L , int tab , const char * key , lua_Integer * result , lua_Integer default_value ) { bool rc = false ; lua_pushstring ( L , key ) ; lua_gettable ( L , tab ) ; if ( ! lua_isnumber ( L , -1 ) ) * result = default_value ; else { * result = lua_tointeger ( L , -1 ) ; rc = true ; } lua_pop ( L , 1 ) ; return rc ; }
Utility to extract a integer field from a table
Utility to extract a integer field from a table
/* get table[key] */ /* remove number */