File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 2121 * Boston, MA 02110-1301, USA gnu@gnu.org
2222 */
2323
24+ #include < string>
25+
2426#include < stdlib.h>
2527#include < glib.h>
2628#include < config.h>
2729#include " gnc-prefs.h"
2830#include " gnc-prefs-p.h"
2931#include " gnc-version.h"
3032
31- static gchar * namespace_regexp = NULL ;
33+ static std::string namespace_regexp;
3234static gboolean is_debugging = FALSE ;
3335static gboolean extras_enabled = FALSE ;
3436static gboolean use_compression = TRUE ; // This is also the default in the prefs backend
@@ -46,17 +48,14 @@ PrefsBackend *prefsbackend = NULL;
4648const gchar *
4749gnc_prefs_get_namespace_regexp (void )
4850{
49- return namespace_regexp;
51+ return namespace_regexp. c_str () ;
5052}
5153
5254void
5355gnc_prefs_set_namespace_regexp (const gchar *str)
5456{
55- if (namespace_regexp)
56- g_free (namespace_regexp);
57-
5857 if (str)
59- namespace_regexp = g_strdup ( str) ;
58+ namespace_regexp = str;
6059}
6160
6261gboolean
You can’t perform that action at this time.
0 commit comments