Fixes for swig bindings.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3072 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2000-10-23 22:09:47 +00:00
parent bdce18dd81
commit 334bf1753e
3 changed files with 12 additions and 6 deletions

View File

@ -310,11 +310,12 @@ const char * xaccAccountGetPriceSrc (Account *acc);
void xaccAccountSortSplits(Account *); void xaccAccountSortSplits(Account *);
#ifndef SWIG
gpointer xaccAccountForEachSplit(Account *s, gpointer xaccAccountForEachSplit(Account *s,
gpointer (*thunk)(Split *s, gpointer data), gpointer (*thunk)(Split *s, gpointer data),
gpointer data); gpointer data);
#ifndef SWIG
/* Traverse all of the transactions in the given account. Continue /* Traverse all of the transactions in the given account. Continue
processing IFF proc does not return FALSE. This function does not processing IFF proc does not return FALSE. This function does not

View File

@ -197,18 +197,21 @@ char * xaccAccountGetNextChildCode (Account *acc, int num_digits);
void xaccGroupAutoCode (AccountGroup *grp, int num_digits); void xaccGroupAutoCode (AccountGroup *grp, int num_digits);
void xaccGroupDepthAutoCode (AccountGroup *grp); void xaccGroupDepthAutoCode (AccountGroup *grp);
#ifndef SWIG
/* if the function returns null for a given item, it won't show up in /* if the function returns null for a given item, it won't show up in
the result list */ the result list */
GSList *xaccGroupMapAccounts(AccountGroup *grp, GSList *xaccGroupMapAccounts(AccountGroup *grp,
gpointer (*thunk)(Account *a, void *data), gpointer (*thunk)(Account *a, void *data),
gpointer data); gpointer data);
gpointer xaccGroupForEachAccountDeeply(AccountGroup *grp, gpointer xaccGroupForEachAccountDeeply(AccountGroup *grp,
gpointer (*thunk)(Account *a, void *data), gpointer (*thunk)(Account *a,
void *data),
gpointer data); gpointer data);
gboolean xaccGroupEqual(AccountGroup *a, AccountGroup *b, gboolean check_guids); gboolean xaccGroupEqual(AccountGroup *a, AccountGroup *b,
gboolean check_guids);
#ifndef SWIG
/* /*
* The following functions provide support for "staged traversals" * The following functions provide support for "staged traversals"

View File

@ -132,7 +132,9 @@ die "Usage: $0 <gnucash-filename>" if $#ARGV < 0;
# open the file, read all of the accounts # open the file, read all of the accounts
print "Opening file $ARGV[0]\n"; print "Opening file $ARGV[0]\n";
$sess = gnucash::xaccMallocSession (); $sess = gnucash::xaccMallocSession ();
$grp = gnucash::xaccSessionBegin ($sess, "file:".$ARGV[0]); gnucash::xaccSessionBegin ($sess, "file:".$ARGV[0]);
gnucash::xaccSessionLoad ($sess);
$grp = gnucash::xaccSessionGetGroup ($sess);
die "failed to read file $ARGV[0], maybe its locked? " if (! $grp); die "failed to read file $ARGV[0], maybe its locked? " if (! $grp);