return NULL;
}
-static inline void
-lua_push_map_str_elt (lua_State *L, const gchar *value, gint len)
-{
- if (len == 0 || value[0] == '\0') {
- lua_pushstring (L, "1"); /* Compatibility */
- }
- else if (len == -1) {
- lua_pushstring (L, value); /* Zero terminated */
- }
- else {
- lua_pushlstring (L, value, len);
- }
-}
-
/* Radix and hash table functions */
static gint
lua_map_get_key (lua_State * L)
}
if (ret) {
- lua_push_map_str_elt (L, value, -1);
+ lua_pushstring (L, value);
return 1;
}
}
len);
if (value) {
- lua_push_map_str_elt (L, value, -1);
+ lua_pushstring (L, value);
return 1;
}
}
lua_createtable (L, ar->len, 0);
PTR_ARRAY_FOREACH (ar, i, val) {
- lua_push_map_str_elt (L, val, -1);
+ lua_pushstring (L, val);
lua_rawseti (L, -2, i + 1);
}
}
if (value) {
- lua_push_map_str_elt (L, value, -1);
+ lua_pushstring (L, value);
return 1;
}
}