mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Add a custom SWIG typemap for wrapping a return value of (char *)NULL
as an empty guile string. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15113 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -25,7 +25,12 @@ typedef char * URLType;
|
||||
typedef char gchar;
|
||||
|
||||
%typemap(newfree) gchar * "g_free($1);"
|
||||
|
||||
%typemap (out) char * {
|
||||
$result = scm_makfrom0str((const char *)$1);
|
||||
if (!SCM_NFALSEP($result)) {
|
||||
$result = scm_makstr(0, 0);
|
||||
}
|
||||
}
|
||||
%typemap(in) GNCPrintAmountInfo "$1 = gnc_scm2printinfo($input);"
|
||||
%typemap(out) GNCPrintAmountInfo "$result = gnc_printinfo2scm($1);"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user