summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mir_core/commonheaders.h2
-rw-r--r--src/mir_core/json/libJSON.cpp12
2 files changed, 7 insertions, 7 deletions
diff --git a/src/mir_core/commonheaders.h b/src/mir_core/commonheaders.h
index 4a76153e96..26e32aa1c8 100644
--- a/src/mir_core/commonheaders.h
+++ b/src/mir_core/commonheaders.h
@@ -36,6 +36,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <commctrl.h>
#include <vssym32.h>
+#include <string>
+
#include <malloc.h>
#include <stdio.h>
#include <time.h>
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();