Add some 'const' declarations.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14690 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton 2006-08-18 04:48:18 +00:00
parent 30cd9e9e21
commit e0244824a0
21 changed files with 97 additions and 86 deletions

View File

@ -1,3 +1,7 @@
2006-08-18 David Hampton <hampton@employees.org>
* various: Add some 'const' declarations.
2006-08-17 Christian Stimming <stimming@tuhh.de>
* lib/libqof/qof/qof.h, qofsession.c: Move #include "qofla-dir.h"

View File

@ -382,7 +382,7 @@ void qof_backend_init(QofBackend *be);
@return 'y' if book is open, otherwise 'n'.
*/
gchar qof_book_get_open_marker(QofBook *book);
gchar qof_book_get_open_marker(const QofBook *book);
/** get the book version
@ -391,13 +391,13 @@ used for tracking multiuser updates in backends.
@return -1 if no book exists, 0 if the book is
new, otherwise the book version number.
*/
gint32 qof_book_get_version (QofBook *book);
gint32 qof_book_get_version (const QofBook *book);
/** get the book tag number
used for kvp management in sql backends.
*/
guint32 qof_book_get_idata (QofBook *book);
guint32 qof_book_get_idata (const QofBook *book);
void qof_book_set_version (QofBook *book, gint32 version);

View File

@ -273,7 +273,7 @@ gboolean
qof_load_backend_library(const gchar *directory, const gchar* module_name);
/** \brief Retrieve the backend used by this book */
QofBackend* qof_book_get_backend (QofBook *book);
QofBackend* qof_book_get_backend (const QofBook *book);
void qof_book_set_backend (QofBook *book, QofBackend *);

View File

@ -135,7 +135,7 @@ qof_book_destroy (QofBook *book)
/* XXX this should probably be calling is_equal callbacks on gncObject */
gboolean
qof_book_equal (QofBook *book_1, QofBook *book_2)
qof_book_equal (const QofBook *book_1, const QofBook *book_2)
{
if (book_1 == book_2) return TRUE;
if (!book_1 || !book_2) return FALSE;
@ -145,7 +145,7 @@ qof_book_equal (QofBook *book_1, QofBook *book_2)
/* ====================================================================== */
gboolean
qof_book_not_saved (QofBook *book)
qof_book_not_saved (const QofBook *book)
{
if (!book) return FALSE;
@ -185,15 +185,16 @@ void qof_book_mark_dirty (QofBook *book)
}
void
qof_book_print_dirty (QofBook *book)
qof_book_print_dirty (const QofBook *book)
{
if (book->inst.dirty)
printf("book is dirty.\n");
qof_book_foreach_collection(book, qof_collection_print_dirty, NULL);
qof_book_foreach_collection
(book, (QofCollectionForeachCB)qof_collection_print_dirty, NULL);
}
time_t
qof_book_get_dirty_time (QofBook *book)
qof_book_get_dirty_time (const QofBook *book)
{
return book->dirty_time;
}
@ -209,14 +210,14 @@ qof_book_set_dirty_cb(QofBook *book, QofBookDirtyCB cb, gpointer user_data)
/* getters */
QofBackend *
qof_book_get_backend (QofBook *book)
qof_book_get_backend (const QofBook *book)
{
if (!book) return NULL;
return book->backend;
}
gboolean
qof_book_shutting_down (QofBook *book)
qof_book_shutting_down (const QofBook *book)
{
if (!book) return FALSE;
return book->shutting_down;
@ -262,7 +263,7 @@ qof_book_set_data_fin (QofBook *book, const char *key, gpointer data, QofBookFin
}
gpointer
qof_book_get_data (QofBook *book, const char *key)
qof_book_get_data (const QofBook *book, const char *key)
{
if (!book || !key) return NULL;
return g_hash_table_lookup (book->data_tables, (gpointer)key);
@ -271,7 +272,7 @@ qof_book_get_data (QofBook *book, const char *key)
/* ====================================================================== */
QofCollection *
qof_book_get_collection (QofBook *book, QofIdType entity_type)
qof_book_get_collection (const QofBook *book, QofIdType entity_type)
{
QofCollection *col;
@ -302,7 +303,7 @@ foreach_cb (gpointer key, gpointer item, gpointer arg)
}
void
qof_book_foreach_collection (QofBook *book,
qof_book_foreach_collection (const QofBook *book,
QofCollectionForeachCB cb, gpointer user_data)
{
struct _iterate iter;
@ -324,19 +325,19 @@ void qof_book_mark_closed (QofBook *book)
book->book_open = 'n';
}
gchar qof_book_get_open_marker(QofBook *book)
gchar qof_book_get_open_marker(const QofBook *book)
{
if(!book) { return 'n'; }
return book->book_open;
}
gint32 qof_book_get_version (QofBook *book)
gint32 qof_book_get_version (const QofBook *book)
{
if(!book) { return -1; }
return book->version;
}
guint32 qof_book_get_idata (QofBook *book)
guint32 qof_book_get_idata (const QofBook *book)
{
if(!book) { return 0; }
return book->idata;

View File

@ -99,11 +99,11 @@ void qof_book_mark_closed (QofBook *book);
* a non-NULL value. (Unless the system malloc failed (out of
* memory) in which case what happens??).
*/
QofCollection * qof_book_get_collection (QofBook *, QofIdType);
QofCollection * qof_book_get_collection (const QofBook *, QofIdType);
/** Invoke the indicated callback on each collection in the book. */
typedef void (*QofCollectionForeachCB) (QofCollection *, gpointer user_data);
void qof_book_foreach_collection (QofBook *, QofCollectionForeachCB, gpointer);
void qof_book_foreach_collection (const QofBook *, QofCollectionForeachCB, gpointer);
/** Return The kvp data for the book.
* Note that the book KVP data is persistent, and is stored/retrieved
@ -134,10 +134,10 @@ void qof_book_set_data_fin (QofBook *book, const gchar *key, gpointer data,
QofBookFinalCB);
/** Retrieves arbitrary pointers to structs stored by qof_book_set_data. */
gpointer qof_book_get_data (QofBook *book, const gchar *key);
gpointer qof_book_get_data (const QofBook *book, const gchar *key);
/** Is the book shutting down? */
gboolean qof_book_shutting_down (QofBook *book);
gboolean qof_book_shutting_down (const QofBook *book);
/** qof_book_not_saved() will return TRUE if any
* data in the book hasn't been saved to long-term storage.
@ -147,7 +147,7 @@ gboolean qof_book_shutting_down (QofBook *book);
* 'dirty' flag. Its up to the backend to periodically reset this
* flag, when it actually does save the data.)
*/
gboolean qof_book_not_saved (QofBook *book);
gboolean qof_book_not_saved (const QofBook *book);
/** The qof_book_mark_saved() routine marks the book as having been
* saved (to a file, to a database). Used by backends to mark the
@ -166,10 +166,10 @@ void qof_book_mark_dirty(QofBook *book);
* and all subsidiary structures, printing out which structures
* have been marked dirty.
*/
void qof_book_print_dirty (QofBook *book);
void qof_book_print_dirty (const QofBook *book);
/** Retrieve the earliest modification time on the book. */
time_t qof_book_get_dirty_time(QofBook *book);
time_t qof_book_get_dirty_time(const QofBook *book);
/** Set the function to call when a book transitions from clean to
* dirty, or vice versa.
@ -183,7 +183,7 @@ void qof_book_kvp_changed (QofBook *book);
/** The qof_book_equal() method returns TRUE if books are equal.
* XXX this routine is broken, and does not currently compare data.
*/
gboolean qof_book_equal (QofBook *book_1, QofBook *book_2);
gboolean qof_book_equal (const QofBook *book_1, const QofBook *book_2);
/** This will 'get and increment' the named counter for this book.
* The return value is -1 on error or the incremented counter.

View File

@ -41,7 +41,7 @@ static gboolean qof_choice_is_initialized(void)
return TRUE;
}
gboolean qof_object_is_choice(QofIdType type)
gboolean qof_object_is_choice(QofIdTypeConst type)
{
gpointer value, check;
@ -67,7 +67,9 @@ qof_choice_create(char* type)
return TRUE;
}
gboolean qof_choice_add_class(char* select, char* option, char* param_name)
gboolean qof_choice_add_class(const char* select,
char* option,
char* param_name)
{
GHashTable *param_table;
GList *option_list;
@ -97,7 +99,9 @@ GList* qof_object_get_choices(QofIdType type, QofParam *param)
return choices;
}
gboolean qof_choice_check(char* choice_obj, char *param_name, char* choice )
gboolean qof_choice_check(const char* choice_obj,
const char *param_name,
const char* choice )
{
GList *choices, *result;
GHashTable *param_table;

View File

@ -113,7 +113,7 @@ parameters contain any data.
@return TRUE if one or more choice parameters has been
registered using the object definition, otherwise FALSE.
*/
gboolean qof_object_is_choice(QofIdType type);
gboolean qof_object_is_choice(QofIdTypeConst type);
/** \brief Set an object as using QOF_TYPE_CHOICE. */
gboolean qof_choice_create(char* type);
@ -127,7 +127,7 @@ gboolean qof_choice_create(char* type);
@return FALSE if object is not a choice object or on error
otherwise TRUE.
*/
gboolean qof_choice_add_class(char* choice, char* add, char* param_name);
gboolean qof_choice_add_class(const char* choice, char* add, char* param_name);
/** \brief Return the list of all object types usable with this parameter.
@ -150,7 +150,9 @@ GList* qof_object_get_choices(QofIdType type, QofParam *param);
@return TRUE if choice is found in the list of allowed choices for
this parameter of this object. Otherwise, FALSE
*/
gboolean qof_choice_check(char* choice_obj, char *param_name, char* choice);
gboolean qof_choice_check(const char* choice_obj,
const char *param_name,
const char* choice);
/** @} */
/** @} */

View File

@ -49,7 +49,7 @@ void qof_collection_insert_entity (QofCollection *, QofEntity *);
/** reset value of dirty flag */
void qof_collection_mark_clean (QofCollection *);
void qof_collection_mark_dirty (QofCollection *);
void qof_collection_print_dirty (QofCollection *col, gpointer dummy);
void qof_collection_print_dirty (const QofCollection *col, gpointer dummy);
/* @} */
/* @} */

View File

@ -113,7 +113,7 @@ qof_entity_set_guid (QofEntity *ent, const GUID *guid)
}
const GUID *
qof_entity_get_guid (QofEntity *ent)
qof_entity_get_guid (const QofEntity *ent)
{
if (!ent) return guid_null();
return &ent->guid;
@ -182,7 +182,7 @@ qof_collection_destroy (QofCollection *col)
/* getters */
QofIdType
qof_collection_get_type (QofCollection *col)
qof_collection_get_type (const QofCollection *col)
{
return col->e_type;
}
@ -303,7 +303,7 @@ qof_collection_compare (QofCollection *target, QofCollection *merge)
}
QofEntity *
qof_collection_lookup_entity (QofCollection *col, const GUID * guid)
qof_collection_lookup_entity (const QofCollection *col, const GUID * guid)
{
QofEntity *ent;
g_return_val_if_fail (col, NULL);
@ -332,7 +332,7 @@ qof_collection_from_glist (QofIdType type, GList *glist)
}
guint
qof_collection_count (QofCollection *col)
qof_collection_count (const QofCollection *col)
{
guint c;
@ -343,7 +343,7 @@ qof_collection_count (QofCollection *col)
/* =============================================================== */
gboolean
qof_collection_is_dirty (QofCollection *col)
qof_collection_is_dirty (const QofCollection *col)
{
return col ? col->is_dirty : FALSE;
}
@ -361,17 +361,17 @@ qof_collection_mark_dirty (QofCollection *col)
}
void
qof_collection_print_dirty (QofCollection *col, gpointer dummy)
qof_collection_print_dirty (const QofCollection *col, gpointer dummy)
{
if (col->is_dirty)
printf("%s collection is dirty.\n", col->e_type);
qof_collection_foreach(col, qof_instance_print_dirty, NULL);
qof_collection_foreach(col, (QofEntityForeachCB)qof_instance_print_dirty, NULL);
}
/* =============================================================== */
gpointer
qof_collection_get_data (QofCollection *col)
qof_collection_get_data (const QofCollection *col)
{
return col ? col->data : NULL;
}
@ -398,7 +398,7 @@ static void foreach_cb (gpointer key, gpointer item, gpointer arg)
}
void
qof_collection_foreach (QofCollection *col, QofEntityForeachCB cb_func,
qof_collection_foreach (const QofCollection *col, QofEntityForeachCB cb_func,
gpointer user_data)
{
struct _iterate iter;

View File

@ -178,7 +178,7 @@ gboolean qof_get_alt_dirty_mode (void);
void qof_set_alt_dirty_mode (gboolean enabled);
/** Return the GUID of this entity */
const GUID * qof_entity_get_guid (QofEntity *);
const GUID * qof_entity_get_guid (const QofEntity *);
/** @name Collections of Entities
@{ */
@ -187,22 +187,22 @@ const GUID * qof_entity_get_guid (QofEntity *);
QofCollection * qof_collection_new (QofIdType type);
/** return the number of entities in the collection. */
guint qof_collection_count (QofCollection *col);
guint qof_collection_count (const QofCollection *col);
/** destroy the collection */
void qof_collection_destroy (QofCollection *col);
/** return the type that the collection stores */
QofIdType qof_collection_get_type (QofCollection *);
QofIdType qof_collection_get_type (const QofCollection *);
/** Find the entity going only from its guid */
QofEntity * qof_collection_lookup_entity (QofCollection *, const GUID *);
QofEntity * qof_collection_lookup_entity (const QofCollection *, const GUID *);
/** Callback type for qof_entity_foreach */
typedef void (*QofEntityForeachCB) (QofEntity *, gpointer user_data);
/** Call the callback for each entity in the collection. */
void qof_collection_foreach (QofCollection *, QofEntityForeachCB,
void qof_collection_foreach (const QofCollection *, QofEntityForeachCB,
gpointer user_data);
/** Store and retreive arbitrary object-defined data
@ -211,11 +211,11 @@ void qof_collection_foreach (QofCollection *, QofEntityForeachCB,
* destroyed, so that the user has a chance to clean up anything
* that was put in the 'data' member here.
*/
gpointer qof_collection_get_data (QofCollection *col);
gpointer qof_collection_get_data (const QofCollection *col);
void qof_collection_set_data (QofCollection *col, gpointer user_data);
/** Return value of 'dirty' flag on collection */
gboolean qof_collection_is_dirty (QofCollection *col);
gboolean qof_collection_is_dirty (const QofCollection *col);
/** @name QOF_TYPE_COLLECT: Linking one entity to many of one type

View File

@ -79,28 +79,28 @@ qof_instance_release (QofInstance *inst)
}
const GUID *
qof_instance_get_guid (QofInstance *inst)
qof_instance_get_guid (const QofInstance *inst)
{
if (!inst) return NULL;
return &inst->entity.guid;
}
QofBook *
qof_instance_get_book (QofInstance *inst)
qof_instance_get_book (const QofInstance *inst)
{
if (!inst) return NULL;
return inst->book;
}
KvpFrame*
qof_instance_get_slots (QofInstance *inst)
qof_instance_get_slots (const QofInstance *inst)
{
if (!inst) return NULL;
return inst->kvp_data;
}
Timespec
qof_instance_get_last_update (QofInstance *inst)
qof_instance_get_last_update (const QofInstance *inst)
{
if (!inst)
{
@ -111,7 +111,7 @@ qof_instance_get_last_update (QofInstance *inst)
}
int
qof_instance_version_cmp (QofInstance *left, QofInstance *right)
qof_instance_version_cmp (const QofInstance *left, const QofInstance *right)
{
if (!left && !right) return 0;
if (!left) return -1;
@ -124,7 +124,7 @@ qof_instance_version_cmp (QofInstance *left, QofInstance *right)
}
void
qof_instance_print_dirty (QofEntity *entity, gpointer dummy)
qof_instance_print_dirty (const QofEntity *entity, gpointer dummy)
{
QofInstance *inst = QOF_INSTANCE(entity);
@ -160,14 +160,14 @@ qof_instance_set_dirty(QofInstance* inst)
}
gboolean
qof_instance_check_edit(QofInstance *inst)
qof_instance_check_edit(const QofInstance *inst)
{
if(inst->editlevel > 0) { return TRUE; }
return FALSE;
}
gboolean
qof_instance_do_free(QofInstance *inst)
qof_instance_do_free(const QofInstance *inst)
{
return inst->do_free;
}
@ -211,7 +211,7 @@ qof_instance_set_last_update (QofInstance *inst, Timespec ts)
/* ========================================================== */
void
qof_instance_gemini (QofInstance *to, QofInstance *from)
qof_instance_gemini (QofInstance *to, const QofInstance *from)
{
time_t now;
@ -234,7 +234,7 @@ qof_instance_gemini (QofInstance *to, QofInstance *from)
}
QofInstance *
qof_instance_lookup_twin (QofInstance *src, QofBook *target_book)
qof_instance_lookup_twin (const QofInstance *src, QofBook *target_book)
{
QofCollection *col;
KvpFrame *fr;

View File

@ -57,13 +57,13 @@ void qof_instance_init (QofInstance *, QofIdType, QofBook *);
void qof_instance_release (QofInstance *inst);
/** Return the book pointer */
QofBook * qof_instance_get_book (QofInstance *);
QofBook * qof_instance_get_book (const QofInstance *);
/** Return the GUID of this instance */
const GUID * qof_instance_get_guid (QofInstance *);
const GUID * qof_instance_get_guid (const QofInstance *);
/** Return the pointer to the kvp_data */
KvpFrame* qof_instance_get_slots (QofInstance *);
KvpFrame* qof_instance_get_slots (const QofInstance *);
/** Return the last time this instance was modified. If QofInstances
* are used with the QofObject storage backends, then the instance
@ -71,7 +71,7 @@ KvpFrame* qof_instance_get_slots (QofInstance *);
* multi-user updates. Non-backend code should not set the update
* times.
*/
Timespec qof_instance_get_last_update (QofInstance *inst);
Timespec qof_instance_get_last_update (const QofInstance *inst);
/** Compare two instances, based on thier last update times.
* Returns a negative, zero or positive value, respectively,
@ -79,9 +79,9 @@ Timespec qof_instance_get_last_update (QofInstance *inst);
* Accepts NULL pointers, NULL's are by definition earlier
* than any value.
*/
int qof_instance_version_cmp (QofInstance *left, QofInstance *right);
int qof_instance_version_cmp (const QofInstance *left, const QofInstance *right);
void qof_instance_print_dirty (QofEntity *entity, gpointer dummy);
void qof_instance_print_dirty (const QofEntity *entity, gpointer dummy);
/** Return value of is_dirty flag */
gboolean qof_instance_is_dirty (QofInstance *);
@ -92,9 +92,9 @@ Sets this instance AND the collection as dirty.
*/
void qof_instance_set_dirty(QofInstance* inst);
gboolean qof_instance_check_edit(QofInstance *inst);
gboolean qof_instance_check_edit(const QofInstance *inst);
gboolean qof_instance_do_free(QofInstance *inst);
gboolean qof_instance_do_free(const QofInstance *inst);
void qof_instance_mark_free(QofInstance *inst);
@ -109,7 +109,7 @@ QofInstance* qof_instance_create (QofIdType type, QofBook *book);
* the gemini kvp includes the book guid as well, so that the right book can
* be found.
*/
void qof_instance_gemini (QofInstance *to, QofInstance *from);
void qof_instance_gemini (QofInstance *to, const QofInstance *from);
/** The qof_instance_lookup_twin() routine will find the "twin" of this
* instance 'src' in the given other 'book' (if the twin exists).
@ -125,7 +125,7 @@ void qof_instance_gemini (QofInstance *to, QofInstance *from);
* in 'book', and return it. If not found, it returns NULL. This
* routine uses the 'gemini' kvp values to do its work.
*/
QofInstance * qof_instance_lookup_twin (QofInstance *src, QofBook *book);
QofInstance * qof_instance_lookup_twin (const QofInstance *src, QofBook *book);
/* @} */
/* @} */

View File

@ -40,7 +40,7 @@
void qof_object_book_begin (QofBook *book);
void qof_object_book_end (QofBook *book);
gboolean qof_object_is_dirty (QofBook *book);
gboolean qof_object_is_dirty (const QofBook *book);
void qof_object_mark_clean (QofBook *book);
/** \brief check an object can be created and supports iteration

View File

@ -89,7 +89,7 @@ void qof_object_book_end (QofBook *book)
}
gboolean
qof_object_is_dirty (QofBook *book)
qof_object_is_dirty (const QofBook *book)
{
GList *l;

View File

@ -92,7 +92,7 @@ struct _QofObject
void (*book_end)(QofBook *);
/** Determine if there are any dirty items in this book */
gboolean (*is_dirty)(QofCollection *);
gboolean (*is_dirty)(const QofCollection *);
/** Mark this object's book clean (for after a load) */
void (*mark_clean)(QofCollection *);
@ -104,7 +104,7 @@ struct _QofObject
* provide this routine, as without it, little of interest can
* be done.
*/
void (*foreach)(QofCollection *, QofEntityForeachCB, gpointer);
void (*foreach)(const QofCollection *, QofEntityForeachCB, gpointer);
/** Given a particular item of this type, return a printable string.
*/

View File

@ -77,7 +77,7 @@ xaccMallocAccountGroup (QofBook *book)
\********************************************************************/
AccountGroup *
xaccCollGetAccountGroup (QofCollection *col)
xaccCollGetAccountGroup (const QofCollection *col)
{
if (!col) return NULL;
return qof_collection_get_data (col);
@ -1287,7 +1287,7 @@ group_book_end (QofBook *book)
}
static gboolean
group_is_dirty (QofCollection *col)
group_is_dirty (const QofCollection *col)
{
return xaccGroupNotSaved(xaccCollGetAccountGroup(col));
}

View File

@ -60,7 +60,7 @@ AccountGroup * xaccGetAccountGroup (QofBook *book);
* The xaccCollAccountGroup() routine will return the top-most
* account group associated with the indicated collection.
*/
AccountGroup * xaccCollGetAccountGroup (QofCollection *col);
AccountGroup * xaccCollGetAccountGroup (const QofCollection *col);
/** The xaccAccountDestroy() routine will destroy and free all
* the data associated with this account group. The group

View File

@ -53,7 +53,7 @@ static QofLogModule log_module = GNC_MOD_SX;
/* ====================================================================== */
AccountGroup *
gnc_collection_get_template_group( QofCollection *col )
gnc_collection_get_template_group( const QofCollection *col )
{
return qof_collection_get_data (col);
}
@ -118,7 +118,7 @@ sxtg_book_end (QofBook *book)
static gboolean
sxtg_is_dirty(QofCollection *col)
sxtg_is_dirty(const QofCollection *col)
{
return xaccGroupNotSaved(gnc_collection_get_template_group(col));
}
@ -145,13 +145,13 @@ static QofObject sxtg_object_def =
/* ====================================================================== */
SchedXactions *
gnc_collection_get_schedxaction_list(QofCollection *col)
gnc_collection_get_schedxaction_list(const QofCollection *col)
{
return qof_collection_get_data (col);
}
GList *
gnc_collection_get_schedxactions(QofCollection *col)
gnc_collection_get_schedxactions(const QofCollection *col)
{
SchedXactions *list;
list = qof_collection_get_data (col);
@ -236,7 +236,7 @@ book_sxns_mark_saved(QofCollection *col)
}
static gboolean
book_sxlist_notsaved(QofCollection *col)
book_sxlist_notsaved(const QofCollection *col)
{
GList *sxlist;
SchedXactions *sxl;

View File

@ -43,13 +43,13 @@
typedef struct xaccSchedXactionsDef SchedXactions;
SchedXactions * gnc_collection_get_schedxaction_list(QofCollection *col);
GList * gnc_collection_get_schedxactions(QofCollection *col);
SchedXactions * gnc_collection_get_schedxaction_list(const QofCollection *col);
GList * gnc_collection_get_schedxactions(const QofCollection *col);
GList * gnc_book_get_schedxactions(QofBook *book);
/** Returns the template group from the book. **/
AccountGroup * gnc_book_get_template_group(QofBook *book);
AccountGroup * gnc_collection_get_template_group(QofCollection *col);
AccountGroup * gnc_collection_get_template_group(const QofCollection *col);
/** @return The list of SXes which reference the given Account. Caller should free this list. **/
GList* gnc_sx_get_sxes_referencing_account(QofBook *book, Account *acct);

View File

@ -2376,7 +2376,7 @@ void_unstable_price_traversal(GNCPriceDB *db,
}
static void
price_foreach(QofCollection *col, QofEntityForeachCB cb, gpointer data)
price_foreach(const QofCollection *col, QofEntityForeachCB cb, gpointer data)
{
GNCPriceDB *db;

View File

@ -32,7 +32,7 @@
#define TEST_MODULE_NAME "object-test"
#define TEST_MODULE_DESC "Test Object"
static void obj_foreach (QofCollection *, QofEntityForeachCB, gpointer);
static void obj_foreach (const QofCollection *, QofEntityForeachCB, gpointer);
static const char * printable (gpointer obj);
static void test_printable (const char *name, gpointer obj);
static void test_foreach (QofBook *, const char *);
@ -78,7 +78,7 @@ test_object (void)
}
static void
obj_foreach (QofCollection *col, QofEntityForeachCB cb, gpointer u_d)
obj_foreach (const QofCollection *col, QofEntityForeachCB cb, gpointer u_d)
{
int *foo = u_d;