diff options
Diffstat (limited to 'src/mir_core/json/libJSON.cpp')
-rw-r--r-- | src/mir_core/json/libJSON.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mir_core/json/libJSON.cpp b/src/mir_core/json/libJSON.cpp index e3599e8936..c8f7a0e3ff 100644 --- a/src/mir_core/json/libJSON.cpp +++ b/src/mir_core/json/libJSON.cpp @@ -152,13 +152,6 @@ MIR_CORE_DLL(json_char*) json_strip_white_space(const json_char * json){ }
#endif
-#ifdef JSON_MEMORY_CALLBACKS
- MIR_CORE_DLL(void) json_register_memory_callbacks(json_malloc_t mal, json_realloc_t real, json_free_t fre){
- JSONMemory::registerMemoryCallbacks(mal, real, fre);
- }
-#endif
-
-
/*
stuff that's in class JSONNode
*/
@@ -283,6 +276,11 @@ MIR_CORE_DLL(json_char*) json_as_string(const JSONNODE * node){ return toCString(((JSONNode*)node) -> as_string());
}
+MIR_CORE_DLL(std::string) json_as_pstring(const JSONNODE * node){
+ JSON_ASSERT_SAFE(node, JSON_TEXT("null node to json_as_string"), return toCString(EMPTY_CSTRING););
+ return ((JSONNode*)node) -> as_string();
+}
+
MIR_CORE_DLL(long) json_as_int(const JSONNODE * node){
JSON_ASSERT_SAFE(node, JSON_TEXT("null node to json_as_int"), return 0;);
return ((JSONNode*)node) -> as_int();
|