summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-10-20 21:36:02 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-10-20 21:36:02 +0000
commit327096ae0df60cf1ad6f59f6dafe474e58b2dbab (patch)
tree47042cd47279f92568cc918b35b3f8747784d173 /src
parenta837271e9d2eda42fb943a4189b9992b89ae9513 (diff)
Added memory allocation function getters (can't write generic function to parse with ownership transfer without them)
git-svn-id: http://pugixml.googlecode.com/svn/trunk@164 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'src')
-rw-r--r--src/pugixml.cpp10
-rw-r--r--src/pugixml.hpp16
2 files changed, 26 insertions, 0 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index 9ae757b..302a015 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -3110,4 +3110,14 @@ namespace pugi
global_allocate = allocate;
global_deallocate = deallocate;
}
+
+ allocation_function PUGIXML_FUNCTION get_memory_allocation_function()
+ {
+ return global_allocate;
+ }
+
+ deallocation_function PUGIXML_FUNCTION get_memory_deallocation_function()
+ {
+ return global_deallocate;
+ }
}
diff --git a/src/pugixml.hpp b/src/pugixml.hpp
index 528c6cb..8c19851 100644
--- a/src/pugixml.hpp
+++ b/src/pugixml.hpp
@@ -2001,6 +2001,22 @@ namespace pugi
* function you set via this function.
*/
void PUGIXML_FUNCTION set_memory_management_functions(allocation_function allocate, deallocation_function deallocate);
+
+ /**
+ * Get current memory allocation function
+ *
+ * \return memory allocation function
+ * \see set_memory_management_functions
+ */
+ allocation_function PUGIXML_FUNCTION get_memory_allocation_function();
+
+ /**
+ * Get current memory deallocation function
+ *
+ * \return memory deallocation function
+ * \see set_memory_management_functions
+ */
+ deallocation_function PUGIXML_FUNCTION get_memory_deallocation_function();
}
// Inline implementation