-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
Lines 64 to 70 in 74f15a0
| static int m__tostring(lua_State *L) { | |
| size_t len; | |
| char *str = bson_as_json(checkBSON(L, 1), &len); | |
| lua_pushlstring(L, str, len); | |
| bson_free(str); | |
| return 1; | |
| } |
static int m__tostring(lua_State *L) {
size_t len;
#if BSON_MAJOR_VERSION == 1
char* str = bson_as_json(checkBSON(L, 1), &len);
#elif BSON_MAJOR_VERSION == 2
char *str = bson_as_legacy_extended_json(checkBSON(L, 1), &len);
#endif
lua_pushlstring(L, str, len);
bson_free(str);
return 1;
}Metadata
Metadata
Assignees
Labels
No labels