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 *);
#ifndef SWIG
gpointer xaccAccountForEachSplit(Account *s,
gpointer (*thunk)(Split *s, gpointer data),
gpointer data);
#ifndef SWIG
/* Traverse all of the transactions in the given account. Continue
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 xaccGroupDepthAutoCode (AccountGroup *grp);
#ifndef SWIG
/* if the function returns null for a given item, it won't show up in
the result list */
GSList *xaccGroupMapAccounts(AccountGroup *grp,
gpointer (*thunk)(Account *a, void *data),
gpointer data);
gpointer xaccGroupForEachAccountDeeply(AccountGroup *grp,
gpointer (*thunk)(Account *a, void *data),
gpointer (*thunk)(Account *a,
void *data),
gpointer data);
gboolean xaccGroupEqual(AccountGroup *a, AccountGroup *b, gboolean check_guids);
#ifndef SWIG
gboolean xaccGroupEqual(AccountGroup *a, AccountGroup *b,
gboolean check_guids);
/*
* 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
print "Opening file $ARGV[0]\n";
$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);