mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Merge Richard Cohen's 'fix-memory-errors' into stable.
This commit is contained in:
commit
08d083e8e1
@ -74,7 +74,7 @@ GLIST_HELPER_INOUT(PriceList, SWIGTYPE_p_GNCPrice);
|
||||
// TODO: free PriceList?
|
||||
GLIST_HELPER_INOUT(CommodityList, SWIGTYPE_p_gnc_commodity);
|
||||
|
||||
%typemap(newfree) gchar * "g_free($1);"
|
||||
%typemap(newfree) char * "g_free($1);"
|
||||
|
||||
/* These need to be here so that they are *before* the function
|
||||
declarations in the header files, some of which are included by
|
||||
|
@ -280,11 +280,10 @@ update_variables (var_store_ptr vars)
|
||||
}
|
||||
}
|
||||
|
||||
static char* _function_evaluation_error_msg = NULL;
|
||||
static void
|
||||
_exception_handler(const char *error_message)
|
||||
{
|
||||
_function_evaluation_error_msg = (char*)error_message;
|
||||
PERR("function eval error: [%s]\n", error_message);
|
||||
}
|
||||
|
||||
static
|
||||
@ -335,14 +334,9 @@ func_op(const char *fname, int argc, void **argv)
|
||||
scmArgs = scm_cons( scmTmp, scmArgs );
|
||||
}
|
||||
|
||||
//scmTmp = scm_apply(scmFn, scmArgs , SCM_EOL);
|
||||
scmTmp = gfec_apply(scmFn, scmArgs, _exception_handler);
|
||||
if (_function_evaluation_error_msg != NULL)
|
||||
{
|
||||
PERR("function eval error: [%s]\n", _function_evaluation_error_msg);
|
||||
_function_evaluation_error_msg = NULL;
|
||||
if (scmTmp == SCM_UNDEFINED)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!scm_is_number (scmTmp))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user