mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user