From 35129a333c57746d4e2f85ad0b2f536f2000f233 Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Wed, 26 Nov 2008 14:35:36 +0000 Subject: [PATCH] Bug #539957: Replace struct named assignments by C99 "designated initializers" Patch by Halton Huo. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17724 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/business/business-core/gncAddress.c | 22 ++++----- src/business/business-core/gncBillTerm.c | 22 ++++----- src/business/business-core/gncCustomer.c | 22 ++++----- src/business/business-core/gncEmployee.c | 22 ++++----- src/business/business-core/gncEntry.c | 22 ++++----- src/business/business-core/gncInvoice.c | 22 ++++----- src/business/business-core/gncJob.c | 22 ++++----- src/business/business-core/gncOrder.c | 22 ++++----- src/business/business-core/gncTaxTable.c | 22 ++++----- src/business/business-core/gncVendor.c | 22 ++++----- src/engine/Account.c | 22 ++++----- src/engine/SX-book.c | 62 ++++++++++++------------ src/engine/SchedXaction.c | 22 ++++----- src/engine/Split.c | 22 ++++----- src/engine/Transaction.c | 22 ++++----- src/engine/gnc-budget.c | 22 ++++----- src/engine/gnc-commodity.c | 58 +++++++++++----------- src/engine/gnc-lot.c | 22 ++++----- src/engine/gnc-pricedb.c | 44 ++++++++--------- 19 files changed, 258 insertions(+), 258 deletions(-) diff --git a/src/business/business-core/gncAddress.c b/src/business/business-core/gncAddress.c index e476116a2e..a3a5df3b96 100644 --- a/src/business/business-core/gncAddress.c +++ b/src/business/business-core/gncAddress.c @@ -373,17 +373,17 @@ int gncAddressCompare (const GncAddress *a, const GncAddress *b) static QofObject GncAddressDesc = { - interface_version: QOF_OBJECT_VERSION, - e_type: GNC_ID_ADDRESS, - type_label: "Address", - create: (gpointer)qofAddressCreate, - book_begin: NULL, - book_end: NULL, - is_dirty: qof_collection_is_dirty, - mark_clean: qof_collection_mark_clean, - foreach: qof_collection_foreach, - printable: NULL, - version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp, + .interface_version = QOF_OBJECT_VERSION, + .e_type = GNC_ID_ADDRESS, + .type_label = "Address", + .create = (gpointer)qofAddressCreate, + .book_begin = NULL, + .book_end = NULL, + .is_dirty = qof_collection_is_dirty, + .mark_clean = qof_collection_mark_clean, + .foreach = qof_collection_foreach, + .printable = NULL, + .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp, }; gboolean gncAddressRegister (void) diff --git a/src/business/business-core/gncBillTerm.c b/src/business/business-core/gncBillTerm.c index 08e53cee6e..e84b35f947 100644 --- a/src/business/business-core/gncBillTerm.c +++ b/src/business/business-core/gncBillTerm.c @@ -705,17 +705,17 @@ static void _gncBillTermDestroy (QofBook *book) static QofObject gncBillTermDesc = { - interface_version: QOF_OBJECT_VERSION, - e_type: _GNC_MOD_NAME, - type_label: "Billing Term", - create: (gpointer)gncBillTermCreate, - book_begin: _gncBillTermCreate, - book_end: _gncBillTermDestroy, - is_dirty: qof_collection_is_dirty, - mark_clean: qof_collection_mark_clean, - foreach: qof_collection_foreach, - printable: NULL, - version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp, + .interface_version = QOF_OBJECT_VERSION, + .e_type = _GNC_MOD_NAME, + .type_label = "Billing Term", + .create = (gpointer)gncBillTermCreate, + .book_begin = _gncBillTermCreate, + .book_end = _gncBillTermDestroy, + .is_dirty = qof_collection_is_dirty, + .mark_clean = qof_collection_mark_clean, + .foreach = qof_collection_foreach, + .printable = NULL, + .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp, }; gboolean gncBillTermRegister (void) diff --git a/src/business/business-core/gncCustomer.c b/src/business/business-core/gncCustomer.c index 22f60cbf98..e1a696f513 100644 --- a/src/business/business-core/gncCustomer.c +++ b/src/business/business-core/gncCustomer.c @@ -578,17 +578,17 @@ static const char * _gncCustomerPrintable (gpointer item) static QofObject gncCustomerDesc = { - interface_version: QOF_OBJECT_VERSION, - e_type: _GNC_MOD_NAME, - type_label: "Customer", - create: (gpointer)gncCustomerCreate, - book_begin: NULL, - book_end: NULL, - is_dirty: qof_collection_is_dirty, - mark_clean: qof_collection_mark_clean, - foreach: qof_collection_foreach, - printable: (const char* (*)(gpointer))gncCustomerGetName, - version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp, + .interface_version = QOF_OBJECT_VERSION, + .e_type = _GNC_MOD_NAME, + .type_label = "Customer", + .create = (gpointer)gncCustomerCreate, + .book_begin = NULL, + .book_end = NULL, + .is_dirty = qof_collection_is_dirty, + .mark_clean = qof_collection_mark_clean, + .foreach = qof_collection_foreach, + .printable = (const char* (*)(gpointer))gncCustomerGetName, + .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp, }; gboolean gncCustomerRegister (void) diff --git a/src/business/business-core/gncEmployee.c b/src/business/business-core/gncEmployee.c index 181897f723..4e368a5f66 100644 --- a/src/business/business-core/gncEmployee.c +++ b/src/business/business-core/gncEmployee.c @@ -420,17 +420,17 @@ static const char * _gncEmployeePrintable (gpointer item) static QofObject gncEmployeeDesc = { - interface_version: QOF_OBJECT_VERSION, - e_type: _GNC_MOD_NAME, - type_label: "Employee", - create: (gpointer)gncEmployeeCreate, - book_begin: NULL, - book_end: NULL, - is_dirty: qof_collection_is_dirty, - mark_clean: qof_collection_mark_clean, - foreach: qof_collection_foreach, - printable: _gncEmployeePrintable, - version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp, + .interface_version = QOF_OBJECT_VERSION, + .e_type = _GNC_MOD_NAME, + .type_label = "Employee", + .create = (gpointer)gncEmployeeCreate, + .book_begin = NULL, + .book_end = NULL, + .is_dirty = qof_collection_is_dirty, + .mark_clean = qof_collection_mark_clean, + .foreach = qof_collection_foreach, + .printable = _gncEmployeePrintable, + .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp, }; gboolean gncEmployeeRegister (void) diff --git a/src/business/business-core/gncEntry.c b/src/business/business-core/gncEntry.c index a112171fe4..989bfe837b 100644 --- a/src/business/business-core/gncEntry.c +++ b/src/business/business-core/gncEntry.c @@ -1240,17 +1240,17 @@ int gncEntryCompare (const GncEntry *a, const GncEntry *b) static QofObject gncEntryDesc = { - interface_version: QOF_OBJECT_VERSION, - e_type: _GNC_MOD_NAME, - type_label: "Order/Invoice/Bill Entry", - create: (gpointer)gncEntryCreate, - book_begin: NULL, - book_end: NULL, - is_dirty: qof_collection_is_dirty, - mark_clean: qof_collection_mark_clean, - foreach: qof_collection_foreach, - printable: NULL, - version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp, + .interface_version = QOF_OBJECT_VERSION, + .e_type = _GNC_MOD_NAME, + .type_label = "Order/Invoice/Bill Entry", + .create = (gpointer)gncEntryCreate, + .book_begin = NULL, + .book_end = NULL, + .is_dirty = qof_collection_is_dirty, + .mark_clean = qof_collection_mark_clean, + .foreach = qof_collection_foreach, + .printable = NULL, + .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp, }; gboolean gncEntryRegister (void) diff --git a/src/business/business-core/gncInvoice.c b/src/business/business-core/gncInvoice.c index b8cd8eda31..63390fa1aa 100644 --- a/src/business/business-core/gncInvoice.c +++ b/src/business/business-core/gncInvoice.c @@ -1681,17 +1681,17 @@ static const char * _gncInvoicePrintable (gpointer obj) static QofObject gncInvoiceDesc = { - interface_version: QOF_OBJECT_VERSION, - e_type: _GNC_MOD_NAME, - type_label: "Invoice", - create: (gpointer)gncInvoiceCreate, - book_begin: NULL, - book_end: NULL, - is_dirty: qof_collection_is_dirty, - mark_clean: qof_collection_mark_clean, - foreach: qof_collection_foreach, - printable: _gncInvoicePrintable, - version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp, + .interface_version = QOF_OBJECT_VERSION, + .e_type = _GNC_MOD_NAME, + .type_label = "Invoice", + .create = (gpointer)gncInvoiceCreate, + .book_begin = NULL, + .book_end = NULL, + .is_dirty = qof_collection_is_dirty, + .mark_clean = qof_collection_mark_clean, + .foreach = qof_collection_foreach, + .printable = _gncInvoicePrintable, + .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp, }; static void diff --git a/src/business/business-core/gncJob.c b/src/business/business-core/gncJob.c index 6b3392b56b..ddc393d238 100644 --- a/src/business/business-core/gncJob.c +++ b/src/business/business-core/gncJob.c @@ -368,17 +368,17 @@ static const char * _gncJobPrintable (gpointer item) static QofObject gncJobDesc = { - interface_version: QOF_OBJECT_VERSION, - e_type: _GNC_MOD_NAME, - type_label: "Job", - create: (gpointer)gncJobCreate, - book_begin: NULL, - book_end: NULL, - is_dirty: qof_collection_is_dirty, - mark_clean: qof_collection_mark_clean, - foreach: qof_collection_foreach, - printable: _gncJobPrintable, - version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp, + .interface_version = QOF_OBJECT_VERSION, + .e_type = _GNC_MOD_NAME, + .type_label = "Job", + .create = (gpointer)gncJobCreate, + .book_begin = NULL, + .book_end = NULL, + .is_dirty = qof_collection_is_dirty, + .mark_clean = qof_collection_mark_clean, + .foreach = qof_collection_foreach, + .printable = _gncJobPrintable, + .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp, }; gboolean gncJobRegister (void) diff --git a/src/business/business-core/gncOrder.c b/src/business/business-core/gncOrder.c index cf62e8cb6a..282c649657 100644 --- a/src/business/business-core/gncOrder.c +++ b/src/business/business-core/gncOrder.c @@ -422,17 +422,17 @@ _gncOrderPrintable (gpointer obj) static QofObject gncOrderDesc = { - interface_version: QOF_OBJECT_VERSION, - e_type: _GNC_MOD_NAME, - type_label: "Order", - create: (gpointer)gncOrderCreate, - book_begin: NULL, - book_end: NULL, - is_dirty: qof_collection_is_dirty, - mark_clean: qof_collection_mark_clean, - foreach: qof_collection_foreach, - printable: _gncOrderPrintable, - version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp, + .interface_version = QOF_OBJECT_VERSION, + .e_type = _GNC_MOD_NAME, + .type_label = "Order", + .create = (gpointer)gncOrderCreate, + .book_begin = NULL, + .book_end = NULL, + .is_dirty = qof_collection_is_dirty, + .mark_clean = qof_collection_mark_clean, + .foreach = qof_collection_foreach, + .printable = _gncOrderPrintable, + .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp, }; gboolean gncOrderRegister (void) diff --git a/src/business/business-core/gncTaxTable.c b/src/business/business-core/gncTaxTable.c index d41338b3fc..e2ac13a7ac 100644 --- a/src/business/business-core/gncTaxTable.c +++ b/src/business/business-core/gncTaxTable.c @@ -802,17 +802,17 @@ static void _gncTaxTableDestroy (QofBook *book) static QofObject gncTaxTableDesc = { - interface_version: QOF_OBJECT_VERSION, - e_type: _GNC_MOD_NAME, - type_label: "Tax Table", - create: (gpointer)gncTaxTableCreate, - book_begin: _gncTaxTableCreate, - book_end: _gncTaxTableDestroy, - is_dirty: qof_collection_is_dirty, - mark_clean: qof_collection_mark_clean, - foreach: qof_collection_foreach, - printable: NULL, - version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp, + .interface_version = QOF_OBJECT_VERSION, + .e_type = _GNC_MOD_NAME, + .type_label = "Tax Table", + .create = (gpointer)gncTaxTableCreate, + .book_begin = _gncTaxTableCreate, + .book_end = _gncTaxTableDestroy, + .is_dirty = qof_collection_is_dirty, + .mark_clean = qof_collection_mark_clean, + .foreach = qof_collection_foreach, + .printable = NULL, + .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp, }; gboolean gncTaxTableRegister (void) diff --git a/src/business/business-core/gncVendor.c b/src/business/business-core/gncVendor.c index b81659cece..2f2707f47f 100644 --- a/src/business/business-core/gncVendor.c +++ b/src/business/business-core/gncVendor.c @@ -521,17 +521,17 @@ static const char * _gncVendorPrintable (gpointer item) static QofObject gncVendorDesc = { - interface_version: QOF_OBJECT_VERSION, - e_type: _GNC_MOD_NAME, - type_label: "Vendor", - create: (gpointer)gncVendorCreate, - book_begin: NULL, - book_end: NULL, - is_dirty: qof_collection_is_dirty, - mark_clean: qof_collection_mark_clean, - foreach: qof_collection_foreach, - printable: _gncVendorPrintable, - version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp, + .interface_version = QOF_OBJECT_VERSION, + .e_type = _GNC_MOD_NAME, + .type_label = "Vendor", + .create = (gpointer)gncVendorCreate, + .book_begin = NULL, + .book_end = NULL, + .is_dirty = qof_collection_is_dirty, + .mark_clean = qof_collection_mark_clean, + .foreach = qof_collection_foreach, + .printable = _gncVendorPrintable, + .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp, }; gboolean gncVendorRegister (void) diff --git a/src/engine/Account.c b/src/engine/Account.c index c8ac2486af..71fc5976ee 100644 --- a/src/engine/Account.c +++ b/src/engine/Account.c @@ -4535,17 +4535,17 @@ xaccAccountForEachTransaction(const Account *acc, TransactionCallback proc, /* QofObject function implementation and registration */ static QofObject account_object_def = { - interface_version: QOF_OBJECT_VERSION, - e_type: GNC_ID_ACCOUNT, - type_label: "Account", - create: (gpointer)xaccMallocAccount, - book_begin: NULL, - book_end: NULL, - is_dirty: qof_collection_is_dirty, - mark_clean: qof_collection_mark_clean, - foreach: qof_collection_foreach, - printable: (const char* (*)(gpointer)) xaccAccountGetName, - version_cmp: (int (*)(gpointer,gpointer)) qof_instance_version_cmp, + .interface_version = QOF_OBJECT_VERSION, + .e_type = GNC_ID_ACCOUNT, + .type_label = "Account", + .create = (gpointer)xaccMallocAccount, + .book_begin = NULL, + .book_end = NULL, + .is_dirty = qof_collection_is_dirty, + .mark_clean = qof_collection_mark_clean, + .foreach = qof_collection_foreach, + .printable = (const char* (*)(gpointer)) xaccAccountGetName, + .version_cmp = (int (*)(gpointer,gpointer)) qof_instance_version_cmp, }; gboolean xaccAccountRegister (void) diff --git a/src/engine/SX-book.c b/src/engine/SX-book.c index a7d0f793fa..1f0caf56b8 100644 --- a/src/engine/SX-book.c +++ b/src/engine/SX-book.c @@ -162,15 +162,15 @@ sxtg_mark_clean(QofCollection *col) static QofObject sxtg_object_def = { - interface_version: QOF_OBJECT_VERSION, - e_type: GNC_ID_SXTG, - type_label: "Scheduled Transaction Templates", - book_begin: sxtg_book_begin, - book_end: sxtg_book_end, - is_dirty: sxtg_is_dirty, - mark_clean: sxtg_mark_clean, - foreach: NULL, - printable: NULL, + .interface_version = QOF_OBJECT_VERSION, + .e_type = GNC_ID_SXTG, + .type_label = "Scheduled Transaction Templates", + .book_begin = sxtg_book_begin, + .book_end = sxtg_book_end, + .is_dirty = sxtg_is_dirty, + .mark_clean = sxtg_mark_clean, + .foreach = NULL, + .printable = NULL, }; /* ====================================================================== */ @@ -294,32 +294,32 @@ book_sxlist_notsaved(const QofCollection *col) static QofObject sxes_object_def = { - interface_version: QOF_OBJECT_VERSION, - e_type: GNC_ID_SXES, - type_label: "Scheduled Transactions List", - create: NULL, - book_begin: book_sxes_setup, - book_end: NULL, - is_dirty: book_sxlist_notsaved, - mark_clean: book_sxns_mark_saved, - foreach: NULL, - printable: NULL, - version_cmp: NULL + .interface_version = QOF_OBJECT_VERSION, + .e_type = GNC_ID_SXES, + .type_label = "Scheduled Transactions List", + .create = NULL, + .book_begin = book_sxes_setup, + .book_end = NULL, + .is_dirty = book_sxlist_notsaved, + .mark_clean = book_sxns_mark_saved, + .foreach = NULL, + .printable = NULL, + .version_cmp = NULL }; static QofObject sxtt_object_def = { - interface_version: QOF_OBJECT_VERSION, - e_type: GNC_ID_SXTT, - type_label: "Scheduled Transaction Templates", - create: NULL, - book_begin: NULL, - book_end: NULL, - is_dirty: NULL, - mark_clean: NULL, - foreach: NULL, - printable: NULL, - version_cmp: NULL, + .interface_version = QOF_OBJECT_VERSION, + .e_type = GNC_ID_SXTT, + .type_label = "Scheduled Transaction Templates", + .create = NULL, + .book_begin = NULL, + .book_end = NULL, + .is_dirty = NULL, + .mark_clean = NULL, + .foreach = NULL, + .printable = NULL, + .version_cmp = NULL, }; gboolean diff --git a/src/engine/SchedXaction.c b/src/engine/SchedXaction.c index 441cd7203d..396b5642f6 100644 --- a/src/engine/SchedXaction.c +++ b/src/engine/SchedXaction.c @@ -851,17 +851,17 @@ gnc_sx_get_defer_instances( SchedXaction *sx ) static QofObject SXDesc = { - interface_version : QOF_OBJECT_VERSION, - e_type : GNC_SX_ID, - type_label : "Scheduled Transaction", - create : (gpointer)xaccSchedXactionMalloc, - book_begin : NULL, - book_end : NULL, - is_dirty : qof_collection_is_dirty, - mark_clean : qof_collection_mark_clean, - foreach : qof_collection_foreach, - printable : NULL, - version_cmp : (int (*)(gpointer, gpointer)) qof_instance_version_cmp, + .interface_version = QOF_OBJECT_VERSION, + .e_type = GNC_SX_ID, + .type_label = "Scheduled Transaction", + .create = (gpointer)xaccSchedXactionMalloc, + .book_begin = NULL, + .book_end = NULL, + .is_dirty = qof_collection_is_dirty, + .mark_clean = qof_collection_mark_clean, + .foreach = qof_collection_foreach, + .printable = NULL, + .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp, }; gboolean diff --git a/src/engine/Split.c b/src/engine/Split.c index 1cf42655da..307b8ac6ba 100644 --- a/src/engine/Split.c +++ b/src/engine/Split.c @@ -1758,17 +1758,17 @@ xaccSplitUnvoid(Split *split) /* Hook into the QofObject registry */ static QofObject split_object_def = { - interface_version: QOF_OBJECT_VERSION, - e_type: GNC_ID_SPLIT, - type_label: "Split", - create: (gpointer)xaccMallocSplit, - book_begin: NULL, - book_end: NULL, - is_dirty: qof_collection_is_dirty, - mark_clean: qof_collection_mark_clean, - foreach: qof_collection_foreach, - printable: (const char* (*)(gpointer)) xaccSplitGetMemo, - version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp, + .interface_version = QOF_OBJECT_VERSION, + .e_type = GNC_ID_SPLIT, + .type_label = "Split", + .create = (gpointer)xaccMallocSplit, + .book_begin = NULL, + .book_end = NULL, + .is_dirty = qof_collection_is_dirty, + .mark_clean = qof_collection_mark_clean, + .foreach = qof_collection_foreach, + .printable = (const char* (*)(gpointer)) xaccSplitGetMemo, + .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp, }; static gpointer diff --git a/src/engine/Transaction.c b/src/engine/Transaction.c index 20293fa418..37c3dcdf3f 100644 --- a/src/engine/Transaction.c +++ b/src/engine/Transaction.c @@ -1912,17 +1912,17 @@ xaccTransFindSplitByAccount(const Transaction *trans, const Account *acc) /* Hook into the QofObject registry */ static QofObject trans_object_def = { - interface_version: QOF_OBJECT_VERSION, - e_type: GNC_ID_TRANS, - type_label: "Transaction", - create: (gpointer)xaccMallocTransaction, - book_begin: NULL, - book_end: NULL, - is_dirty: qof_collection_is_dirty, - mark_clean: qof_collection_mark_clean, - foreach: qof_collection_foreach, - printable: (const char* (*)(gpointer)) xaccTransGetDescription, - version_cmp: (int (*)(gpointer,gpointer)) qof_instance_version_cmp, + .interface_version = QOF_OBJECT_VERSION, + .e_type = GNC_ID_TRANS, + .type_label = "Transaction", + .create = (gpointer)xaccMallocTransaction, + .book_begin = NULL, + .book_end = NULL, + .is_dirty = qof_collection_is_dirty, + .mark_clean = qof_collection_mark_clean, + .foreach = qof_collection_foreach, + .printable = (const char* (*)(gpointer)) xaccTransGetDescription, + .version_cmp = (int (*)(gpointer,gpointer)) qof_instance_version_cmp, }; static gboolean diff --git a/src/engine/gnc-budget.c b/src/engine/gnc-budget.c index 9af51bc5b7..38a52ff045 100644 --- a/src/engine/gnc-budget.c +++ b/src/engine/gnc-budget.c @@ -596,17 +596,17 @@ gnc_budget_get_default (QofBook *book) /* Define the QofObject. */ static QofObject budget_object_def = { - interface_version: QOF_OBJECT_VERSION, - e_type: GNC_ID_BUDGET, - type_label: "Budget", - create: (gpointer)gnc_budget_new, - book_begin: NULL, - book_end: NULL, - is_dirty: qof_collection_is_dirty, - mark_clean: qof_collection_mark_clean, - foreach: qof_collection_foreach, - printable: (const char* (*)(gpointer)) gnc_budget_get_name, - version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp, + .interface_version = QOF_OBJECT_VERSION, + .e_type = GNC_ID_BUDGET, + .type_label = "Budget", + .create = (gpointer)gnc_budget_new, + .book_begin = NULL, + .book_end = NULL, + .is_dirty = qof_collection_is_dirty, + .mark_clean = qof_collection_mark_clean, + .foreach = qof_collection_foreach, + .printable = (const char* (*)(gpointer)) gnc_budget_get_name, + .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp, }; diff --git a/src/engine/gnc-commodity.c b/src/engine/gnc-commodity.c index 7d49fbd1e9..79c3eedea2 100644 --- a/src/engine/gnc-commodity.c +++ b/src/engine/gnc-commodity.c @@ -2319,28 +2319,28 @@ gnc_commodity_table_add_default_data(gnc_commodity_table *table, QofBook *book) static QofObject commodity_object_def = { - interface_version: QOF_OBJECT_VERSION, - e_type: GNC_ID_COMMODITY, - type_label: "Commodity", - book_begin: NULL, - book_end: NULL, - is_dirty: qof_collection_is_dirty, - mark_clean: qof_collection_mark_clean, - foreach: qof_collection_foreach, - printable: (const char* (*)(gpointer)) gnc_commodity_get_fullname, + .interface_version = QOF_OBJECT_VERSION, + .e_type = GNC_ID_COMMODITY, + .type_label = "Commodity", + .book_begin = NULL, + .book_end = NULL, + .is_dirty = qof_collection_is_dirty, + .mark_clean = qof_collection_mark_clean, + .foreach = qof_collection_foreach, + .printable = (const char* (*)(gpointer)) gnc_commodity_get_fullname, }; static QofObject namespace_object_def = { - interface_version: QOF_OBJECT_VERSION, - e_type: GNC_ID_COMMODITY_NAMESPACE, - type_label: "Namespace", - book_begin: NULL, - book_end: NULL, - is_dirty: NULL, - mark_clean: NULL, - foreach: NULL, - printable: NULL, + .interface_version = QOF_OBJECT_VERSION, + .e_type = GNC_ID_COMMODITY_NAMESPACE, + .type_label = "Namespace", + .book_begin = NULL, + .book_end = NULL, + .is_dirty = NULL, + .mark_clean = NULL, + .foreach = NULL, + .printable = NULL, }; static void @@ -2375,17 +2375,17 @@ commodity_table_book_end (QofBook *book) static QofObject commodity_table_object_def = { - interface_version: QOF_OBJECT_VERSION, - e_type: GNC_ID_COMMODITY_TABLE, - type_label: "CommodityTable", - create: NULL, - book_begin: commodity_table_book_begin, - book_end: commodity_table_book_end, - is_dirty: qof_collection_is_dirty, - mark_clean: qof_collection_mark_clean, - foreach: NULL, - printable: NULL, - version_cmp: NULL, + .interface_version = QOF_OBJECT_VERSION, + .e_type = GNC_ID_COMMODITY_TABLE, + .type_label = "CommodityTable", + .create = NULL, + .book_begin = commodity_table_book_begin, + .book_end = commodity_table_book_end, + .is_dirty = qof_collection_is_dirty, + .mark_clean = qof_collection_mark_clean, + .foreach = NULL, + .printable = NULL, + .version_cmp = NULL, }; gboolean diff --git a/src/engine/gnc-lot.c b/src/engine/gnc-lot.c index 9e92264c1f..dc7bcf4f0a 100644 --- a/src/engine/gnc-lot.c +++ b/src/engine/gnc-lot.c @@ -438,17 +438,17 @@ gnc_lot_get_latest_split (GNCLot *lot) static QofObject gncLotDesc = { - interface_version: QOF_OBJECT_VERSION, - e_type: GNC_ID_LOT, - type_label: "Lot", - create: (gpointer)gnc_lot_new, - book_begin: NULL, - book_end: NULL, - is_dirty: qof_collection_is_dirty, - mark_clean: qof_collection_mark_clean, - foreach: qof_collection_foreach, - printable: NULL, - version_cmp: (int (*)(gpointer,gpointer))qof_instance_version_cmp, + .interface_version = QOF_OBJECT_VERSION, + .e_type = GNC_ID_LOT, + .type_label = "Lot", + .create = (gpointer)gnc_lot_new, + .book_begin = NULL, + .book_end = NULL, + .is_dirty = qof_collection_is_dirty, + .mark_clean = qof_collection_mark_clean, + .foreach = qof_collection_foreach, + .printable = NULL, + .version_cmp = (int (*)(gpointer,gpointer))qof_instance_version_cmp, }; diff --git a/src/engine/gnc-pricedb.c b/src/engine/gnc-pricedb.c index dc0f9bc4c0..3768fd2e62 100644 --- a/src/engine/gnc-pricedb.c +++ b/src/engine/gnc-pricedb.c @@ -2444,32 +2444,32 @@ price_printable(gpointer obj) static QofObject price_object_def = { - interface_version: QOF_OBJECT_VERSION, - e_type: GNC_ID_PRICE, - type_label: "Price", - create: price_create, - book_begin: NULL, - book_end: NULL, - is_dirty: qof_collection_is_dirty, - mark_clean: qof_collection_mark_clean, - foreach: price_foreach, - printable: price_printable, - version_cmp: NULL, + .interface_version = QOF_OBJECT_VERSION, + .e_type = GNC_ID_PRICE, + .type_label = "Price", + .create = price_create, + .book_begin = NULL, + .book_end = NULL, + .is_dirty = qof_collection_is_dirty, + .mark_clean = qof_collection_mark_clean, + .foreach = price_foreach, + .printable = price_printable, + .version_cmp = NULL, }; static QofObject pricedb_object_def = { - interface_version: QOF_OBJECT_VERSION, - e_type: GNC_ID_PRICEDB, - type_label: "PriceDB", - create: NULL, - book_begin: pricedb_book_begin, - book_end: pricedb_book_end, - is_dirty: qof_collection_is_dirty, - mark_clean: qof_collection_mark_clean, - foreach: NULL, - printable: NULL, - version_cmp: NULL, + .interface_version = QOF_OBJECT_VERSION, + .e_type = GNC_ID_PRICEDB, + .type_label = "PriceDB", + .create = NULL, + .book_begin = pricedb_book_begin, + .book_end = pricedb_book_end, + .is_dirty = qof_collection_is_dirty, + .mark_clean = qof_collection_mark_clean, + .foreach = NULL, + .printable = NULL, + .version_cmp = NULL, }; gboolean