r15191 - gnucash/branches/gda-dev/src/engine - 1) Make some function arguments 'const'

Phil Longstaff plongstaff at cvs.gnucash.org
Fri Dec 8 13:45:37 EST 2006


Author: plongstaff
Date: 2006-12-08 13:45:36 -0500 (Fri, 08 Dec 2006)
New Revision: 15191
Trac: http://svn.gnucash.org/trac/changeset/15191

Modified:
   gnucash/branches/gda-dev/src/engine/SchedXaction.c
   gnucash/branches/gda-dev/src/engine/SchedXaction.h
   gnucash/branches/gda-dev/src/engine/Transaction.c
Log:
1) Make some function arguments 'const'
2) Add GNC_SX macro similar to GObject cast macros


Modified: gnucash/branches/gda-dev/src/engine/SchedXaction.c
===================================================================
--- gnucash/branches/gda-dev/src/engine/SchedXaction.c	2006-12-07 14:35:07 UTC (rev 15190)
+++ gnucash/branches/gda-dev/src/engine/SchedXaction.c	2006-12-08 18:45:36 UTC (rev 15191)
@@ -371,7 +371,7 @@
 }
 
 void
-xaccSchedXactionGetAutoCreate( SchedXaction *sx,
+xaccSchedXactionGetAutoCreate( const SchedXaction *sx,
                                gboolean *outAutoCreate,
                                gboolean *outNotify )
 {

Modified: gnucash/branches/gda-dev/src/engine/SchedXaction.h
===================================================================
--- gnucash/branches/gda-dev/src/engine/SchedXaction.h	2006-12-07 14:35:07 UTC (rev 15190)
+++ gnucash/branches/gda-dev/src/engine/SchedXaction.h	2006-12-08 18:45:36 UTC (rev 15191)
@@ -47,6 +47,9 @@
 */
 typedef struct gncp_SchedXaction SchedXaction;
 
+#define GNC_IS_SX(obj)  (QOF_CHECK_TYPE((obj), GNC_SX_ID))
+#define GNC_SX(obj)     (QOF_CHECK_CAST((obj), GNC_SX_ID, SchedXaction))
+
 /**
  * Creates and initializes a scheduled transaction.
 */
@@ -121,7 +124,7 @@
 GList *xaccSchedXactionGetSplits( SchedXaction *sx );
 void xaccSchedXactionSetSplits( SchedXaction *sx, GList *newSplits );
 
-void xaccSchedXactionGetAutoCreate( SchedXaction *sx,
+void xaccSchedXactionGetAutoCreate( const SchedXaction *sx,
                                     gboolean *outAutoCreate,
                                     gboolean *outNotify );
 void xaccSchedXactionSetAutoCreate( SchedXaction *sx,

Modified: gnucash/branches/gda-dev/src/engine/Transaction.c
===================================================================
--- gnucash/branches/gda-dev/src/engine/Transaction.c	2006-12-07 14:35:07 UTC (rev 15190)
+++ gnucash/branches/gda-dev/src/engine/Transaction.c	2006-12-08 18:45:36 UTC (rev 15191)
@@ -39,6 +39,7 @@
 #include "Scrub.h"
 #include "Scrub3.h"
 #include "TransactionP.h"
+#include "Split.h"
 #include "SplitP.h"
 #include "TransLog.h"
 #include "cap-gains.h"



More information about the gnucash-changes mailing list