aboutsummaryrefslogtreecommitdiffstats
path: root/core/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-10-17 16:29:32 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-23 18:17:02 -0700
commitb9b51ffd4ebd14e085bef69ee0daf6a1927cc960 (patch)
tree78549b41ebf8dd7cfc707d220a10d578c5a7873c /core/CMakeLists.txt
parentac3042b48bf8ee3a8f69a0384c5124c512108b11 (diff)
downloadsubsurface-b9b51ffd4ebd14e085bef69ee0daf6a1927cc960.tar.gz
core: add a small helper-struct that keeps track of xml-parameters
The XML-parameter code is a mess. Ownership is unclear. Allocation and freeing of strings is in different functions. Sometimes only every second string is free()d, because keys are not copied. But this is done inconsistently. The caller has to know how many parameters the callee may add. Instead, let's add a small helper-struct that uses C++ memory management, but exports a C-API. The array for the XML-library is generated on the fly. This is only the implementation, the old code is not yet replaced. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/CMakeLists.txt')
-rw-r--r--core/CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index caaa2b74c..079d1a1fe 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -189,6 +189,8 @@ set(SUBSURFACE_CORE_LIB_SRCS
worldmap-options.h
worldmap-save.c
worldmap-save.h
+ xmlparams.cpp
+ xmlparams.h
xmp_parser.cpp
xmp_parser.h