static gboolean billterm_refcount_handler (xmlNodePtr node, gpointer billterm_pdata) { struct billterm_pdata *pdata = billterm_pdata; gint64 val; dom_tree_to_integer(node, &val); gncBillTermSetRefcount (pdata->term, val); return TRUE; }
static void billterm_reset_refcount (gpointer key, gpointer value, gpointer notused) { GncBillTerm *term = key; gint32 count = GPOINTER_TO_INT(value); if (count != gncBillTermGetRefcount(term) && !gncBillTermGetInvisible(term)) { PWARN("Fixing refcount on billterm %s (%" G_GINT64_FORMAT " -> %d)\n", guid_to_string(qof_instance_get_guid(QOF_INSTANCE(term))), gncBillTermGetRefcount(term), count); gncBillTermSetRefcount(term, count); } }
static void billterm_reset_refcount (gpointer key, gpointer value, gpointer notused) { GncBillTerm* term = static_cast<decltype (term)> (key); gint32 count = GPOINTER_TO_INT (value); if (count != gncBillTermGetRefcount (term) && !gncBillTermGetInvisible (term)) { gchar termstr[GUID_ENCODING_LENGTH + 1]; guid_to_string_buff (qof_instance_get_guid (QOF_INSTANCE (term)), termstr); PWARN ("Fixing refcount on billterm %s (%" G_GINT64_FORMAT " -> %d)\n", termstr, gncBillTermGetRefcount (term), count); gncBillTermSetRefcount (term, count); } }