Changing scheme conversion to gdate to use time64

This commit is contained in:
lmat 2017-11-21 12:36:36 -05:00 committed by Christopher Lam
parent d36742d941
commit 7d51089501
4 changed files with 7 additions and 5 deletions

View File

@ -53,7 +53,7 @@ typedef char gchar;
%typemap(in) Timespec "$1 = gnc_timepair2timespec($input);"
%typemap(out) Timespec "$result = gnc_timespec2timepair($1);"
%typemap(in) GDate "$1 = gnc_timepair_to_GDate($input);"
%typemap(in) GDate "$1 = gnc_time64_to_GDate($input);"
%typemap(in) GncGUID "$1 = gnc_scm2guid($input);"
%typemap(out) GncGUID "$result = gnc_guid2scm($1);"

View File

@ -34,7 +34,7 @@
SCM gnc_timespec2timepair(Timespec t);
Timespec gnc_timepair2timespec(SCM x);
GDate gnc_timepair_to_GDate(SCM x);
GDate gnc_time64_to_GDate(SCM x);
int gnc_timepair_p(SCM x);
SCM gnc_guid2scm(GncGUID guid);

View File

@ -309,10 +309,10 @@ gnc_timepair2timespec(SCM x)
return(result);
}
GDate gnc_timepair_to_GDate(SCM x)
GDate gnc_time64_to_GDate(SCM x)
{
Timespec tspec = gnc_timepair2timespec(x);
return timespec_to_gdate(tspec);
time64 time = scm_to_int64 (x);
return time64_to_gdate(time);
}
int

View File

@ -346,6 +346,8 @@ void timespecFromTime64 (Timespec *ts, time64 t );
/** Turns a Timespec into a time64 */
time64 timespecToTime64 (Timespec ts);
GDate time64_to_gdate (time64 t);
/** Turns a Timespec into a GDate */
GDate timespec_to_gdate (Timespec ts);