[Gnucash-changes] Patch from Chris Shoemaker to add a sprinkling of 'const' keywords to

David Hampton hampton at cvs.gnucash.org
Thu Oct 13 01:08:05 EDT 2005


Log Message:
-----------
Patch from Chris Shoemaker to add a sprinkling of 'const' keywords to
Account accessor function arguments.

Tags:
----
gnucash-gnome2-dev

Modified Files:
--------------
    gnucash:
        ChangeLog
    gnucash/src/app-utils:
        gnc-ui-util.c
    gnucash/src/backend/file:
        io-example-account.c
        io-gncxml-v2.c
    gnucash/src/engine:
        Account.c
        Account.h

Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1487.2.326
retrieving revision 1.1487.2.327
diff -LChangeLog -LChangeLog -u -r1.1487.2.326 -r1.1487.2.327
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,36 @@
+2005-10-13  David Hampton  <hampton at employees.org>
+
+	* src/app-utils/gnc-ui-util.c:
+	* src/backend/file/io-example-account.c:
+	* src/backend/file/io-gncxml-v2.c:
+	* src/engine/Account.[ch]: Patch from Chris Shoemaker to add a
+	sprinkling of 'const' keywords to Account accessor function
+	arguments.
+
+	* src/valgrind-gdk.supp:
+	* src/valgrind-gnucash.supp:
+	* src/valgrind-x11.supp: Patch from Chris Shoemaker to add some
+	additional suppressions when invoking gnucash via valgrind.
+
+	* Makefile.TAGS: Patch from Chris Shoemaker to exclude emacs
+	temporary files from etags table.
+
+	* src/app-utils/gnc-ui-util.c:
+	* src/business/business-core/gncAddress.c:
+	* src/business/business-core/gncCustomer.c:
+	* src/business/business-core/gncEmployee.c:
+	* src/business/business-core/gncEntry.c:
+	* src/business/business-core/gncJob.c:
+	* src/business/business-core/gncOrder.c:
+	* src/business/business-core/gncVendor.c:
+	* src/engine/Account.c:
+	* src/engine/Transaction.c:
+	* src/register/register-gnome/gnucash-grid.c:
+	* src/register/register-gnome/gnucash-sheet.c: Patch from Chris
+	Shoemaker to remove the G_INLINE_FUNC macro from various function
+	definitions.  Fixes undefined symbol errors preventing him from
+	linking the program.
+
 2005-10-12  David Hampton  <hampton at employees.org>
 
 	* Makefile.am:
Index: io-gncxml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/io-gncxml-v2.c,v
retrieving revision 1.24.4.11
retrieving revision 1.24.4.12
diff -Lsrc/backend/file/io-gncxml-v2.c -Lsrc/backend/file/io-gncxml-v2.c -u -r1.24.4.11 -r1.24.4.12
--- src/backend/file/io-gncxml-v2.c
+++ src/backend/file/io-gncxml-v2.c
@@ -75,9 +75,9 @@
 static void
 clear_up_account_commodity(
     gnc_commodity_table *tbl, Account *act,
-    gnc_commodity * (*getter) (Account *account),
+    gnc_commodity * (*getter) (const Account *account),
     void (*setter) (Account *account, gnc_commodity *comm),
-    int (*scu_getter) (Account *account),
+    int (*scu_getter) (const Account *account),
     void (*scu_setter) (Account *account, int scu))
 {
     gnc_commodity *gcom;
Index: io-example-account.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/io-example-account.c,v
retrieving revision 1.12.4.3
retrieving revision 1.12.4.4
diff -Lsrc/backend/file/io-example-account.c -Lsrc/backend/file/io-example-account.c -u -r1.12.4.3 -r1.12.4.4
--- src/backend/file/io-example-account.c
+++ src/backend/file/io-example-account.c
@@ -91,7 +91,7 @@
 static void
 clear_up_account_commodity(
     gnc_commodity_table *tbl, Account *act,
-    gnc_commodity * (*getter) (Account *account),
+    gnc_commodity * (*getter) (const Account *account),
     void (*setter) (Account *account, gnc_commodity *comm))
 {
     gnc_commodity *gcom;
Index: gnc-ui-util.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gnc-ui-util.c,v
retrieving revision 1.39.2.14
retrieving revision 1.39.2.15
diff -Lsrc/app-utils/gnc-ui-util.c -Lsrc/app-utils/gnc-ui-util.c -u -r1.39.2.14 -r1.39.2.15
--- src/app-utils/gnc-ui-util.c
+++ src/app-utils/gnc-ui-util.c
@@ -1001,8 +1001,8 @@
 
 static GNCPrintAmountInfo
 gnc_account_print_info_helper(Account *account, gboolean use_symbol,
-                              gnc_commodity * (*efffunc)(Account *),
-                              int (*scufunc)(Account*))
+                              gnc_commodity * (*efffunc)(const Account *),
+                              int (*scufunc)(const Account*))
 {
   GNCPrintAmountInfo info;
   gboolean is_iso;
Index: Account.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Account.c,v
retrieving revision 1.222.4.20
retrieving revision 1.222.4.21
diff -Lsrc/engine/Account.c -Lsrc/engine/Account.c -u -r1.222.4.20 -r1.222.4.21
--- src/engine/Account.c
+++ src/engine/Account.c
@@ -1351,7 +1351,7 @@
 }
 
 int
-xaccAccountGetCommoditySCUi (Account * acc) 
+xaccAccountGetCommoditySCUi (const Account * acc)
 {
   if (!acc) return 0;
 
@@ -1359,7 +1359,7 @@
 }
 
 int
-xaccAccountGetCommoditySCU (Account * acc) 
+xaccAccountGetCommoditySCU (const Account * acc)
 {
   if (!acc) return 0;
 
@@ -1383,7 +1383,7 @@
 }
 
 gboolean
-xaccAccountGetNonStdSCU (Account * acc) 
+xaccAccountGetNonStdSCU (const Account * acc)
 {
   if (!acc) return 0;
 
@@ -1563,7 +1563,7 @@
 }
 
 gnc_commodity * 
-DxaccAccountGetCurrency (Account *acc)
+DxaccAccountGetCurrency (const Account *acc)
 {
   KvpValue *v;
   const char *s;
@@ -1583,7 +1583,7 @@
 }
 
 gnc_commodity * 
-xaccAccountGetCommodity (Account *acc)
+xaccAccountGetCommodity (const Account *acc)
 {
   if (!acc) return NULL;
 
Index: Account.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Account.h,v
retrieving revision 1.110.4.15
retrieving revision 1.110.4.16
diff -Lsrc/engine/Account.h -Lsrc/engine/Account.h -u -r1.110.4.15 -r1.110.4.16
--- src/engine/Account.h
+++ src/engine/Account.h
@@ -303,7 +303,7 @@
 #define DxaccAccountSetSecurity xaccAccountSetCommodity
 
 /** Get the account's commodity  */
-gnc_commodity * xaccAccountGetCommodity (Account *account);
+gnc_commodity * xaccAccountGetCommodity (const Account *account);
 
 /** @deprecated do not use */
 #define DxaccAccountGetSecurity xaccAccountGetCommodity
@@ -312,11 +312,11 @@
  *   set for the account, that is returned; else the default SCU for
  *   the account commodity is returned.
  */
-int  xaccAccountGetCommoditySCU (Account *account);
+int  xaccAccountGetCommoditySCU (const Account *account);
 
 /** Return the 'internal' SCU setting.  This returns the over-ride
  *   SCU for the account (which might not be set, and might be zero).  */
-int  xaccAccountGetCommoditySCUi (Account *account);
+int  xaccAccountGetCommoditySCUi (const Account *account);
 
 /** Set the SCU for the account. Normally, this routine is not
  *   required, as the default SCU for an account is given by its
@@ -332,7 +332,7 @@
 
 /** Return boolean, indicating whether this account uses a 
  *   non-standard SCU. */ 
-gboolean  xaccAccountGetNonStdSCU (Account *account);
+gboolean  xaccAccountGetNonStdSCU (const Account *account);
 /**@}*/
 
 
@@ -733,7 +733,7 @@
 /** @deprecated The current API associates only one thing with an
  * account: the 'commodity'. Use xaccAccountGetCommodity() to fetch
  * it. */
-gnc_commodity * DxaccAccountGetCurrency (Account *account);
+gnc_commodity * DxaccAccountGetCurrency (const Account *account);
 
 /** Set the timezone to be used when interpreting the results from a
  *  given Finance::Quote backend.  Unfortunately, the upstream sources


More information about the gnucash-changes mailing list