r23265 - gnucash/trunk/src/core-utils - Properly share a variable between two source files

Geert Janssens gjanssens at code.gnucash.org
Mon Oct 7 10:29:31 EDT 2013


Author: gjanssens
Date: 2013-10-07 10:29:30 -0400 (Mon, 07 Oct 2013)
New Revision: 23265
Trac: http://svn.gnucash.org/trac/changeset/23265

Modified:
   gnucash/trunk/src/core-utils/gnc-prefs-p.h
   gnucash/trunk/src/core-utils/gnc-prefs.c
Log:
Properly share a variable between two source files

Modified: gnucash/trunk/src/core-utils/gnc-prefs-p.h
===================================================================
--- gnucash/trunk/src/core-utils/gnc-prefs-p.h	2013-10-07 14:28:44 UTC (rev 23264)
+++ gnucash/trunk/src/core-utils/gnc-prefs-p.h	2013-10-07 14:29:30 UTC (rev 23265)
@@ -106,6 +106,6 @@
 
 } PrefsBackend;
 
-PrefsBackend prefsbackend;
+extern PrefsBackend prefsbackend;
 
 #endif /* GNC_PREFS_P_H_ */

Modified: gnucash/trunk/src/core-utils/gnc-prefs.c
===================================================================
--- gnucash/trunk/src/core-utils/gnc-prefs.c	2013-10-07 14:28:44 UTC (rev 23264)
+++ gnucash/trunk/src/core-utils/gnc-prefs.c	2013-10-07 14:29:30 UTC (rev 23265)
@@ -35,6 +35,8 @@
 static gint file_retention_policy = 1;    // 1 = "days", the default in the prefs backend
 static gint file_retention_days   = 30;   // This is also the default in the prefs backend
 
+PrefsBackend prefsbackend;
+
 /* This static indicates the debugging module that this .o belongs to.  */
 static QofLogModule log_module = G_LOG_DOMAIN;
 



More information about the gnucash-changes mailing list