Fix deprecated G_TYPE_INSTANCE_GET_PRIVATE and G_INLINE_FUNC

with the function/declaration that they substituted.
Note that this doesn't use the recommended new GObject creation macros
because the class names in libgnucash/engine don't follow the gnome
naming convention.
This commit is contained in:
John Ralls
2019-09-10 16:33:33 -07:00
parent 70eb7172d5
commit c23f3f05e3
77 changed files with 84 additions and 84 deletions

View File

@@ -121,7 +121,7 @@ enum
};
#define GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_ACCOUNT, AccountPrivate))
((AccountPrivate*)g_type_instance_get_private((GTypeInstance*)o, GNC_TYPE_ACCOUNT))
/********************************************************************\
* Because I can't use C++ for this project, doesn't mean that I *
@@ -241,7 +241,7 @@ GList *gnc_account_list_name_violations (QofBook *book, const gchar *separator)
/********************************************************************\
\********************************************************************/
G_INLINE_FUNC void mark_account (Account *acc);
static inline void mark_account (Account *acc);
void
mark_account (Account *acc)
{

View File

@@ -228,13 +228,13 @@ xaccTransStillHasSplit(const Transaction *trans, const Split *s)
} \
}
G_INLINE_FUNC void mark_trans (Transaction *trans);
static inline void mark_trans (Transaction *trans);
void mark_trans (Transaction *trans)
{
FOR_EACH_SPLIT(trans, mark_split(s));
}
G_INLINE_FUNC void gen_event_trans (Transaction *trans);
static inline void gen_event_trans (Transaction *trans);
void gen_event_trans (Transaction *trans)
{
GList *node;

View File

@@ -74,7 +74,7 @@ typedef struct GncBudgetPrivate
} GncBudgetPrivate;
#define GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE((o), GNC_TYPE_BUDGET, GncBudgetPrivate))
((GncBudgetPrivate*)g_type_instance_get_private((GTypeInstance*)o, GNC_TYPE_BUDGET))
struct _GncBudgetClass
{

View File

@@ -90,7 +90,7 @@ typedef struct gnc_commodityPrivate
} gnc_commodityPrivate;
#define GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE((o), GNC_TYPE_COMMODITY, gnc_commodityPrivate))
((gnc_commodityPrivate*)g_type_instance_get_private((GTypeInstance*)o, GNC_TYPE_COMMODITY))
struct _GncCommodityClass
{

View File

@@ -95,7 +95,7 @@ typedef struct GNCLotPrivate
} GNCLotPrivate;
#define GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE((o), GNC_TYPE_LOT, GNCLotPrivate))
((GNCLotPrivate*)g_type_instance_get_private((GTypeInstance*)o, GNC_TYPE_LOT))
#define gnc_lot_set_guid(L,G) qof_instance_set_guid(QOF_INSTANCE(L),&(G))

View File

@@ -61,7 +61,7 @@ static QofLogModule log_module = GNC_MOD_BUSINESS;
#define _GNC_MOD_NAME GNC_ADDRESS_MODULE_NAME
G_INLINE_FUNC void mark_address (GncAddress *address);
static inline void mark_address (GncAddress *address);
void mark_address (GncAddress *address)
{
address->dirty = TRUE;

View File

@@ -86,7 +86,7 @@ static QofLogModule log_module = GNC_MOD_BUSINESS;
/* ============================================================== */
/* misc inline funcs */
G_INLINE_FUNC void mark_customer (GncCustomer *customer);
static inline void mark_customer (GncCustomer *customer);
void mark_customer (GncCustomer *customer)
{
qof_instance_set_dirty(&customer->inst);

View File

@@ -71,7 +71,7 @@ static QofLogModule log_module = GNC_MOD_BUSINESS;
#define _GNC_MOD_NAME GNC_ID_EMPLOYEE
G_INLINE_FUNC void mark_employee (GncEmployee *employee);
static inline void mark_employee (GncEmployee *employee);
void mark_employee (GncEmployee *employee)
{
qof_instance_set_dirty(&employee->inst);

View File

@@ -200,7 +200,7 @@ gboolean gncEntryPaymentStringToType (const char *str, GncEntryPaymentType *type
member = tmp; \
}
G_INLINE_FUNC void mark_entry (GncEntry *entry);
static inline void mark_entry (GncEntry *entry);
void mark_entry (GncEntry *entry)
{
qof_instance_set_dirty(&entry->inst);

View File

@@ -61,7 +61,7 @@ static QofLogModule log_module = GNC_MOD_BUSINESS;
/* ================================================================== */
/* misc inline functions */
G_INLINE_FUNC void mark_job (GncJob *job);
static inline void mark_job (GncJob *job);
void mark_job (GncJob *job)
{
qof_instance_set_dirty(&job->inst);

View File

@@ -74,7 +74,7 @@ static QofLogModule log_module = GNC_MOD_BUSINESS;
member = tmp; \
}
G_INLINE_FUNC void mark_order (GncOrder *order);
static inline void mark_order (GncOrder *order);
void mark_order (GncOrder *order)
{
qof_instance_set_dirty(&order->inst);

View File

@@ -78,7 +78,7 @@ static QofLogModule log_module = GNC_MOD_BUSINESS;
/* ============================================================ */
/* Misc inline funcs */
G_INLINE_FUNC void mark_vendor (GncVendor *vendor);
static inline void mark_vendor (GncVendor *vendor);
void mark_vendor (GncVendor *vendor)
{
qof_instance_set_dirty(&vendor->inst);

View File

@@ -112,7 +112,7 @@ typedef struct QofInstancePrivate
} QofInstancePrivate;
#define GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), QOF_TYPE_INSTANCE, QofInstancePrivate))
((QofInstancePrivate*)g_type_instance_get_private((GTypeInstance*)o, QOF_TYPE_INSTANCE))
G_DEFINE_TYPE_WITH_PRIVATE(QofInstance, qof_instance, G_TYPE_OBJECT);
QOF_GOBJECT_FINALIZE(qof_instance);