Dave Peticolas writes:
 > > Dave Peticolas writes:
 > >  > 
 > >  > Ok, I have written the function I mentioned in the
 > >  > last email. I will try to get the balance report
 > >  > working with it.
 > >  >
 > > 
 > > That's cool - it's a fairly trivial exercise in either language.
 > 
 > I think the type problem is due to the fact that the functions
 > you are using should have a time_t argument, not an int. I'm going
 > to add two functions to the Query api that use timespecs instead
 > of time_t. I think that will solve the problem.

The reason that I assumed that it would work is the following function
in src/engine/Transaction.h:

void          xaccTransSetDateSecs (Transaction *, time_t);

which is wrapped in src/g-wrap/gnc.gwp as follows:

new-function
 'gnc:transaction-set-date-secs
 'void "xaccTransSetDateSecs" '((Transaction* t) (int secs)) 
 "Set date on transaction based on time_t (seconds since Jan 1 1970)")


gnc:transaction-set-date-secs is not currently used, and if used would
probably generate the same bug.  Seeing there is already a C function

void          xaccTransSetDateTS (Transaction *, const Timespec *);

we should probably wrap it rather than the currently-used
xaccTransSetDateSecs.

-- 
---------------------------------------------------------------------------
Robert Merkel                                               [EMAIL PROTECTED]

What a strange game.  The only winning move is not to play.
                -- WOP, "War Games"
---------------------------------------------------------------------------

--
Gnucash Developer's List 
To unsubscribe send empty email to: [EMAIL PROTECTED]

Reply via email to