it's unstable and prone to crash if I do the wrong thing, but I've got several crashers fixed.
Attached is a patch to fix the compile errors (generated by the arch "tla show-changeset --diff"
command, so it may not be in the best format) and a couple of other things (a deprecation in the
"head" command in autogen.sh and a configure fix to detect db). Remember this is for the
gnome2 branch, so it may not apply directly to the mainline, but maybe someone can use this.
It's primarily just fixing things like GINT_TO_POINTER casts, but there are a couple of
other things in there too.
Best Regards, Heath Martin
Chris Lyttle wrote:
I'm willing to at least try to do this on my x86_64 system (with help of course!). Dunno if it'll be more hassle than its worth for the real dev's, but if you are willing to answer my stupid questions like 'what to look for' then I'll give it a go. I would like to push a release off until the end of oct tho to give me a chance to do at least a bit to get gnucash to compile and run on x86_64. Damm to many things to do and not enough hours in the day...
Chris
On Thu, 2004-09-30 at 15:15, Derek Atkins wrote:
Herbert Thoma <[EMAIL PROTECTED]> writes:
PS: It would also be nice if we could get the code compiling on x86_64I have a Athlon64 with SuSE 9.1 at work. I can try to compile and send
before the 1.8.10 release -- anyone with an x86_64 platform running a
64-bit linux willing to help port the code?
bug reports next week. I cannot promise to do much porting work myself,
though.
That's the problem -- we need someone who can feed us patches. I dont have time to deal with it myself, but I do have the time (I hope) to commit patches to CVS. Right now the problem is that string_to_gnc_numeric() returns a gchar* but code in backend/file/(something) is trying to cast that to a gboolean. Apparantly all the other string_to_FOO() functions return gboolean (or gnc_numeric is the first one handled in the file).
-derek
* added files
{arch}/gnucash-gnome2/gnucash-gnome2--devel/gnucash-gnome2--devel--1.9/[EMAIL PROTECTED]/patch-log/patch-1
* modified files
--- orig/configure.in
+++ mod/configure.in
@@ -770,9 +770,9 @@
DB_LIBS=
AC_CHECK_LIB(db-3, __db185_open, DB_LIBS="-ldb-3",
- AC_CHECK_LIB(db-4.0, __db185_open, DB_LIBS="-ldb-4.0",
- AC_CHECK_LIB(db-4.1, __db185_open, DB_LIBS="-ldb-4.1",
- AC_CHECK_LIB(db-4.2, __db185_open, DB_LIBS="-ldb-4.2",
+ AC_CHECK_LIB(db-4.0, __db185_open_4000, DB_LIBS="-ldb-4.0",
+ AC_CHECK_LIB(db-4.1, __db185_open_4000, DB_LIBS="-ldb-4.1",
+ AC_CHECK_LIB(db-4.2, __db185_open_4000, DB_LIBS="-ldb-4.2",
AC_MSG_ERROR([Your db library is missing db 1.85 compatibility mode])
)
)
--- orig/lib/egg/egg-menu-merge.c
+++ mod/lib/egg/egg-menu-merge.c
@@ -713,7 +713,7 @@
GError **error)
{
gchar *buffer;
- gint length;
+ gsize length;
guint res;
if (!g_file_get_contents (filename, &buffer, &length, error))
--- orig/macros/autogen.sh
+++ mod/macros/autogen.sh
@@ -21,7 +21,7 @@
this_prog="$1"
want_vers="$2"
- testv=`"$this_prog" --version 2>/dev/null | head -1 | awk '{print $NF}'`
+ testv=`"$this_prog" --version 2>/dev/null | head -n 1 | awk '{print $NF}'`
if test -z "$testv" ; then return 1 ; fi
testv_major=`echo "$testv" | sed 's/\([0-9]*\).\([0-9]*\).*$/\1/'`
--- orig/src/app-utils/gnc-exp-parser.c
+++ mod/src/app-utils/gnc-exp-parser.c
@@ -108,12 +108,12 @@
else if (SCM_STRINGP (val_scm))
{
char *s;
- const char *err;
+ gboolean err;
s = gh_scm2newstr (val_scm, NULL);
err = string_to_gnc_numeric (s, &value);
- if (err == NULL)
+ if (err == FALSE)
good = FALSE;
free (s);
--- orig/src/backend/file/io-gncbin-r.c
+++ mod/src/backend/file/io-gncbin-r.c
@@ -828,12 +828,12 @@
/* first, see if we've already created the account */
acc = (Account *) g_hash_table_lookup(ids_to_finished_accounts,
- (gconstpointer) acc_id);
+ GINT_TO_POINTER(acc_id));
if (acc) return acc;
/* next, see if its an unclaimed account */
acc = (Account *) g_hash_table_lookup(ids_to_unfinished_accounts,
- (gconstpointer) acc_id);
+ GINT_TO_POINTER(acc_id));
if (acc) return acc;
/* if neither, then it does not yet exist. Create it.
@@ -841,7 +841,7 @@
acc = xaccMallocAccount (book);
xaccAccountBeginEdit(acc);
g_hash_table_insert(ids_to_unfinished_accounts,
- (gpointer) acc_id,
+ GINT_TO_POINTER(acc_id),
(gpointer) acc);
return acc;
}
--- orig/src/backend/file/sixtp-dom-parsers.c
+++ mod/src/backend/file/sixtp-dom-parsers.c
@@ -479,7 +479,7 @@
ret = g_new(gnc_numeric, 1);
- if(string_to_gnc_numeric(content, ret) != NULL)
+ if(string_to_gnc_numeric(content, ret))
{
g_free(content);
return ret;
--- orig/src/backend/file/test/test-xml-transaction.c
+++ mod/src/backend/file/test/test-xml-transaction.c
@@ -128,7 +128,9 @@
if(!gnc_numeric_equal(*num, val))
{
g_free(num);
- return g_strdup_printf ("values differ: %lld/%lld v %lld/%lld",
+ return g_strdup_printf ("values differ: %" G_GINT64_FORMAT "/%"
+ G_GINT64_FORMAT " v %" G_GINT64_FORMAT
+ "/%" G_GINT64_FORMAT,
(*num).num, (*num).denom,
val.num, val.denom);
}
@@ -140,14 +142,14 @@
gnc_numeric val = xaccSplitGetAmount(spl);
if (!gnc_numeric_equal(*num, val)) {
- return g_strdup_printf( "quantities differ under _equal: %lld/%lld v %lld/%lld",
+ return g_strdup_printf( "quantities differ under _equal: %" G_GINT64_FORMAT "/%" G_GINT64_FORMAT " v %" G_GINT64_FORMAT "/%" G_GINT64_FORMAT "",
(*num).num, (*num).denom,
val.num, val.denom );
}
if(!gnc_numeric_equal(*num, val))
{
g_free(num);
- return g_strdup_printf ("quantities differ: %lld/%lld v %lld/%lld",
+ return g_strdup_printf ("quantities differ: %" G_GINT64_FORMAT "/%" G_GINT64_FORMAT " v %" G_GINT64_FORMAT "/%" G_GINT64_FORMAT "",
(*num).num, (*num).denom,
val.num, val.denom);
}
--- orig/src/business/business-core/file/gnc-bill-term-xml-v2.c
+++ mod/src/business/business-core/file/gnc-bill-term-xml-v2.c
@@ -658,7 +658,7 @@
gint32 count = GPOINTER_TO_INT(value);
if (count != gncBillTermGetRefcount(term) && !gncBillTermGetInvisible(term)) {
- PWARN("Fixing refcount on billterm %s (%lld -> %d)\n",
+ 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);
--- orig/src/business/business-core/file/gnc-tax-table-xml-v2.c
+++ mod/src/business/business-core/file/gnc-tax-table-xml-v2.c
@@ -620,7 +620,7 @@
gint32 count = GPOINTER_TO_INT(value);
if (count != gncTaxTableGetRefcount(table) && !gncTaxTableGetInvisible(table)) {
- PWARN("Fixing refcount on taxtable %s (%lld -> %d)\n",
+ PWARN("Fixing refcount on taxtable %s (%" G_GINT64_FORMAT " -> %d)\n",
guid_to_string(qof_instance_get_guid(QOF_INSTANCE(table))),
gncTaxTableGetRefcount(table), count)
gncTaxTableSetRefcount(table, count);
--- orig/src/business/business-gnome/dialog-customer.c
+++ mod/src/business/business-gnome/dialog-customer.c
@@ -295,7 +295,7 @@
/* Set the customer id if one has not been chosen */
if (safe_strcmp (gtk_entry_get_text (GTK_ENTRY (cw->id_entry)), "") == 0) {
gtk_entry_set_text (GTK_ENTRY (cw->id_entry),
- g_strdup_printf ("%.6lld",
+ g_strdup_printf ("%.6" G_GINT64_FORMAT "",
gncCustomerNextID (cw->book)));
}
--- orig/src/business/business-gnome/dialog-employee.c
+++ mod/src/business/business-gnome/dialog-employee.c
@@ -231,7 +231,7 @@
/* Set the employee id if one has not been chosen */
if (safe_strcmp (gtk_entry_get_text (GTK_ENTRY (ew->id_entry)), "") == 0) {
gtk_entry_set_text (GTK_ENTRY (ew->id_entry),
- g_strdup_printf ("%.6lld",
+ g_strdup_printf ("%.6" G_GINT64_FORMAT "",
gncEmployeeNextID (ew->book)));
}
--- orig/src/business/business-gnome/dialog-invoice.c
+++ mod/src/business/business-gnome/dialog-invoice.c
@@ -374,7 +374,7 @@
res = gtk_entry_get_text (GTK_ENTRY (iw->id_entry));
if (safe_strcmp (res, "") == 0) {
gtk_entry_set_text (GTK_ENTRY (iw->id_entry),
- g_strdup_printf ("%.6lld", gncInvoiceNextID(iw->book)));
+ g_strdup_printf ("%.6" G_GINT64_FORMAT "", gncInvoiceNextID(iw->book)));
}
return TRUE;
--- orig/src/business/business-gnome/dialog-job.c
+++ mod/src/business/business-gnome/dialog-job.c
@@ -141,7 +141,7 @@
res = gtk_entry_get_text (GTK_ENTRY (jw->id_entry));
if (safe_strcmp (res, "") == 0) {
gtk_entry_set_text (GTK_ENTRY (jw->id_entry),
- g_strdup_printf ("%.6lld", gncJobNextID(jw->book)));
+ g_strdup_printf ("%.6" G_GINT64_FORMAT "", gncJobNextID(jw->book)));
}
/* Now save it off */
--- orig/src/business/business-gnome/dialog-order.c
+++ mod/src/business/business-gnome/dialog-order.c
@@ -711,7 +711,7 @@
/* Setup initial values */
ow->order_guid = *gncOrderGetGUID (order);
gtk_entry_set_text (GTK_ENTRY (ow->id_entry),
- g_strdup_printf ("%.6lld", gncOrderNextID(bookp)));
+ g_strdup_printf ("%.6" G_GINT64_FORMAT "", gncOrderNextID(bookp)));
ow->component_id =
gnc_register_gui_component (DIALOG_NEW_ORDER_CM_CLASS,
--- orig/src/business/business-gnome/dialog-vendor.c
+++ mod/src/business/business-gnome/dialog-vendor.c
@@ -218,7 +218,7 @@
/* Check for valid id and set one if necessary */
if (safe_strcmp (gtk_entry_get_text (GTK_ENTRY (vw->id_entry)), "") == 0)
gtk_entry_set_text (GTK_ENTRY (vw->id_entry),
- g_strdup_printf ("%.6lld",
+ g_strdup_printf ("%.6" G_GINT64_FORMAT "",
gncVendorNextID(vw->book)));
/* Now save it off */
--- orig/src/engine/Account.c
+++ mod/src/engine/Account.c
@@ -997,7 +997,7 @@
cleared_balance = acc->starting_cleared_balance;
reconciled_balance = acc->starting_reconciled_balance;
- PINFO ("acct=%s starting baln=%lld/%lld", acc->accountName,
+ PINFO ("acct=%s starting baln=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT, acc->accountName,
balance.num, balance.denom);
for(lp = acc->splits; lp; lp = lp->next)
{
@@ -1864,7 +1864,7 @@
rc = xaccAccountGetXxxBalanceInCurrencyRecursive (account,
xaccAccountGetBalance,
report_commodity, include_children);
- PINFO (" baln=%lld/%lld", rc.num, rc.denom);
+ PINFO (" baln=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT, rc.num, rc.denom);
return rc;
}
--- orig/src/engine/Transaction.c
+++ mod/src/engine/Transaction.c
@@ -753,7 +753,7 @@
xaccSplitSetAmount (Split *s, gnc_numeric amt)
{
if(!s) return;
- ENTER ("split=%p old amt=%lld/%lld new amt=%lld/%lld", s,
+ ENTER ("split=%p old amt=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT " new amt=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT "", s,
s->amount.num, s->amount.denom, amt.num, amt.denom);
check_open (s->parent);
@@ -769,7 +769,7 @@
xaccSplitSetValue (Split *s, gnc_numeric amt)
{
if(!s) return;
- ENTER ("split=%p old val=%lld/%lld new val=%lld/%lld", s,
+ ENTER ("split=%p old val=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT " new val=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT "", s,
s->value.num, s->value.denom, amt.num, amt.denom);
check_open (s->parent);
@@ -1379,7 +1379,7 @@
gnc_commodity_get_fraction (base_currency),
GNC_RND_ROUND);
- LEAVE (" total=%lld/%lld", value.num, value.denom);
+ LEAVE (" total=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT "", value.num, value.denom);
return value;
}
--- orig/src/engine/cap-gains.c
+++ mod/src/engine/cap-gains.c
@@ -177,10 +177,10 @@
xaccAccountFindEarliestOpenLot (Account *acc, gnc_numeric sign)
{
GNCLot *lot;
- ENTER (" sign=%lld/%lld", sign.num, sign.denom);
+ ENTER (" sign=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT "", sign.num, sign.denom);
lot = xaccAccountFindOpenLot (acc, sign,
- 10000000LL * ((long long) LONG_MAX), earliest_pred);
+ ((long long) LONG_MAX), earliest_pred);
LEAVE ("found lot=%p %s", lot, gnc_lot_get_title (lot));
return lot;
}
@@ -189,10 +189,10 @@
xaccAccountFindLatestOpenLot (Account *acc, gnc_numeric sign)
{
GNCLot *lot;
- ENTER (" sign=%lld/%lld", sign.num, sign.denom);
+ ENTER (" sign=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT "", sign.num, sign.denom);
lot = xaccAccountFindOpenLot (acc, sign,
- -10000000LL * ((long long) LONG_MAX), latest_pred);
+ ((long long) LONG_MAX), latest_pred);
LEAVE ("found lot=%p %s", lot, gnc_lot_get_title (lot));
return lot;
}
@@ -504,7 +504,7 @@
/* Provide a reasonable title for the new lot */
id = kvp_frame_get_gint64 (xaccAccountGetSlots (acc), "/lot-mgmt/next-id");
- snprintf (buff, 200, _("Lot %lld"), id);
+ snprintf (buff, 200, _("Lot %" G_GINT64_FORMAT ""), id);
kvp_frame_set_str (gnc_lot_get_slots (lot), "/title", buff);
id ++;
kvp_frame_set_gint64 (xaccAccountGetSlots (acc), "/lot-mgmt/next-id", id);
--- orig/src/engine/gnc-lot.c
+++ mod/src/engine/gnc-lot.c
@@ -305,7 +305,7 @@
Timespec ts;
Split *earliest = NULL;
- ts.tv_sec = 1000000LL * ((long long) LONG_MAX);
+ ts.tv_sec = ((long long) LONG_MAX);
ts.tv_nsec = 0;
if (!lot) return NULL;
@@ -334,7 +334,7 @@
Timespec ts;
Split *latest = NULL;
- ts.tv_sec = -1000000LL * ((long long) LONG_MAX);
+ ts.tv_sec = -((long long) LONG_MAX);
ts.tv_nsec = 0;
if (!lot) return NULL;
--- orig/src/engine/gnc-numeric.c
+++ mod/src/engine/gnc-numeric.c
@@ -1112,31 +1112,31 @@
return result;
}
-const gchar *
+gboolean
string_to_gnc_numeric(const gchar* str, gnc_numeric *n) {
size_t num_read;
long long int tmpnum;
long long int tmpdenom;
- if(!str) return NULL;
+ if(!str) return FALSE;
#ifdef GNC_DEPRECATED
/* must use "<" here because %n's effects aren't well defined */
if(sscanf(str, " " GNC_SCANF_LLD "/" GNC_SCANF_LLD "%n",
&tmpnum, &tmpdenom, &num_read) < 2) {
- return(NULL);
+ return FALSE;
}
#else
tmpnum = strtoll (str, NULL, 0);
str = strchr (str, '/');
- if (!str) return NULL;
+ if (!str) return FALSE;
str ++;
tmpdenom = strtoll (str, NULL, 0);
num_read = strspn (str, "0123456789");
#endif
n->num = tmpnum;
n->denom = tmpdenom;
- return(str + num_read);
+ return TRUE;
}
#ifdef _GNC_NUMERIC_TEST
--- orig/src/engine/gnc-numeric.h
+++ mod/src/engine/gnc-numeric.h
@@ -99,7 +99,7 @@
/** Read a gnc_numeric from str, skipping any leading whitespace, and
returning a pointer to just past the last byte read. Return NULL
on error. */
-const gchar *string_to_gnc_numeric(const gchar* str, gnc_numeric *n);
+gboolean string_to_gnc_numeric(const gchar* str, gnc_numeric *n);
/** make a special error-signalling gnc_numeric */
gnc_numeric gnc_numeric_error(int error_code);
--- orig/src/engine/qofquery.c
+++ mod/src/engine/qofquery.c
@@ -1697,7 +1697,7 @@
if (!safe_strcmp (pd->type_name, QOF_TYPE_INT64))
{
query_int64_t pdata = (query_int64_t) pd;
- g_string_sprintfa (gs, " int64: %lld", pdata->val);
+ g_string_sprintfa (gs, " int64: %" G_GINT64_FORMAT "", pdata->val);
return;
}
if (!safe_strcmp (pd->type_name, QOF_TYPE_INT32))
--- orig/src/engine/qofquerycore.c
+++ mod/src/engine/qofquerycore.c
@@ -843,7 +843,7 @@
{
gint64 num = ((query_int64_getter)get)(object);
- return g_strdup_printf (GNC_SCANF_LLD, num);
+ return g_strdup_printf ("%" G_GINT64_FORMAT, num);
}
/* ================================================================ */
--- orig/src/gnome-utils/dialog-account.c
+++ mod/src/gnome-utils/dialog-account.c
@@ -1168,7 +1168,7 @@
{
text[0] = (gchar *) xaccAccountGetTypeStr(acct_type);
row = gtk_clist_append(type_list, text);
- gtk_clist_set_row_data(type_list, row, (gpointer)acct_type);
+ gtk_clist_set_row_data(type_list, row, GINT_TO_POINTER(acct_type));
}
}
else
@@ -1191,7 +1191,7 @@
if (aw->valid_types == NULL)
return last_used_account_type;
- if (g_list_index (aw->valid_types, (gpointer)last_used_account_type) != -1)
+ if (g_list_index (aw->valid_types, GINT_TO_POINTER(last_used_account_type)) != -1)
return last_used_account_type;
return ((GNCAccountType)(aw->valid_types->data));
--- orig/src/gnome-utils/gnc-query-list.c
+++ mod/src/gnome-utils/gnc-query-list.c
@@ -182,7 +182,7 @@
if (safe_strcmp (type, QUERYCORE_BOOLEAN))
continue;
- result = (gboolean)(gnc_search_param_compute_value(param, entry));
+ result = (gboolean) GPOINTER_TO_INT(gnc_search_param_compute_value(param, entry));
gnc_clist_set_check (clist, row, i, result);
}
}
--- orig/src/gnome/dialog-scheduledxaction.c
+++ mod/src/gnome/dialog-scheduledxaction.c
@@ -1737,7 +1737,7 @@
sxd = (SchedXactionDialog*)d;
cl = GTK_CLIST(glade_xml_get_widget( sxd->gxml, SX_LIST ));
for( sel = cl->selection; sel; sel = g_list_next(sel) ) {
- row = (int)sel->data;
+ row = GPOINTER_TO_INT(sel->data);
/* get the clist row for this listitem */
sx = (SchedXaction*)gtk_clist_get_row_data( cl, row );
/* get the object UD */
@@ -1774,7 +1774,7 @@
realConfDelOpenMsg = g_string_new( beingEditedMessage );
beingEditedList = NULL;
for ( ; sel ; sel = sel->next ) {
- sx = (SchedXaction*)gtk_clist_get_row_data( cl, (int)sel->data );
+ sx = (SchedXaction*)gtk_clist_get_row_data( cl, GPOINTER_TO_INT(sel->data));
g_string_sprintfa( realConfDeleteMsg, "\n\"%s\"",
xaccSchedXactionGetName( sx ) );
if ( (l = gnc_find_gui_components( DIALOG_SCHEDXACTION_EDITOR_CM_CLASS,
@@ -1837,7 +1837,7 @@
gpointer unused;
gboolean foundP;
- sx = (SchedXaction*)gtk_clist_get_row_data( cl, (int)sel->data );
+ sx = (SchedXaction*)gtk_clist_get_row_data( cl, GPOINTER_TO_INT(sel->data));
sxList = g_list_remove( sxList, (gpointer)sx );
foundP = g_hash_table_lookup_extended( sxd->sxData, sx,
&unused, (gpointer*)p_tag );
@@ -1857,7 +1857,7 @@
sel = g_list_reverse( sel );
gtk_clist_unselect_all( cl );
for ( ; sel; sel = sel->next ) {
- gtk_clist_remove( cl, (int)sel->data );
+ gtk_clist_remove( cl, GPOINTER_TO_INT(sel->data));
}
g_list_free( sel );
sel = NULL;
@@ -2054,7 +2054,7 @@
}
gtk_clist_sort( clist );
gtk_clist_thaw( clist );
- g_hash_table_insert( sxd->sxData, (gpointer)sx, (gpointer)gdcMarkTag );
+ g_hash_table_insert( sxd->sxData, (gpointer)sx, GINT_TO_POINTER(gdcMarkTag));
g_string_free( freqStr, TRUE );
g_string_free( nextDate, TRUE );
--- orig/src/gnome/dialog-sxsincelast.c
+++ mod/src/gnome/dialog-sxsincelast.c
@@ -1388,7 +1388,7 @@
toDelPtr;
toDelPtr = toDelPtr->next ) {
- row = (gint)toDelPtr->data;
+ row = GPOINTER_TO_INT(toDelPtr->data);
tdt = (toDeleteTuple*)gtk_clist_get_row_data( cl, row );
elt = g_list_find( sxList, tdt->sx );
sxList = g_list_remove_link( sxList, elt );
@@ -3052,7 +3052,7 @@
print_vars_helper( gpointer key, gpointer value, gpointer user_data )
{
DEBUG( "\"%s\" -> %.8x [%s]",
- (gchar*)key, (unsigned int)value,
+ (gchar*)key, GPOINTER_TO_UINT(value),
gnc_numeric_to_string( *(gnc_numeric*)value ) );
}
--- orig/src/gnome/druid-loan.c
+++ mod/src/gnome/druid-loan.c
@@ -2570,8 +2570,8 @@
RevRepaymentRow *rrr = g_new0( RevRepaymentRow, 1 );
if ( !key || !val ) {
DEBUG( "%.8x, %.8x",
- (unsigned int)key,
- (unsigned int)val );
+ GPOINTER_TO_UINT(key),
+ GPOINTER_TO_UINT(val));
}
rrr->date = *(GDate*)key;
rrr->numCells = (gnc_numeric*)val;
--- orig/src/gnome/gnc-plugin-page-account-tree.c
+++ mod/src/gnome/gnc-plugin-page-account-tree.c
@@ -791,7 +791,7 @@
}
}
- return (gpointer) (helper_res->has_splits || helper_res->has_ro_splits);
+ return GINT_TO_POINTER (helper_res->has_splits || helper_res->has_ro_splits);
}
static void
--- orig/src/import-export/import-match-map.c
+++ mod/src/import-export/import-match-map.c
@@ -238,7 +238,7 @@
PINFO("P('%s') = '%d'\n", (char*)key, probability);
- g_hash_table_insert(final_probabilities, key, (gpointer)probability);
+ g_hash_table_insert(final_probabilities, key, GINT_TO_POINTER(probability));
}
/** Frees an array of the same time that buildProperties built */
@@ -270,10 +270,10 @@
struct account_info *account_i = (struct account_info*)data;
/* if the current probability is greater than the stored, store the current */
- if((gint32)value > account_i->probability)
+ if(GPOINTER_TO_INT(value) > account_i->probability)
{
/* Save the new highest probability and the assoaciated account name */
- account_i->probability = (gint32)value;
+ account_i->probability = GPOINTER_TO_INT(value);
account_i->account_name = key;
}
}
_______________________________________________ gnucash-devel mailing list [EMAIL PROTECTED] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
