Commit Graph

11 Commits

Author SHA1 Message Date
John Ralls
cf2870b71a [options] Change RelativeDate and Multichoice index type to uint16_t.
From size_t because clang thinks that std::is_same_v<size_t, time64> is
true and we need to differentiate the handling of the two.
2022-08-06 16:25:42 -07:00
Christopher Lam
1c64385614 base-typemaps: avoid slow g_list_nth_data
scan GList via glist pointer links rather than incrementing index.
2019-12-05 10:17:12 +08:00
John Ralls
59a6ebc33a Fix TravisCI build failure. 2018-09-18 15:07:47 -07:00
John Ralls
0cf42a75b3 Bug 796858 - TypeError: in method 'qof_query_int32_predicate',...
argument 2 of type 'gint32' on gnucash.gnucash_core.QueryInt32Predicate

Add gint32 to typemap.
Also replace a couple of PyString_ calls leftover from Py2.
2018-09-18 10:23:11 -07:00
Christoph Holtermann
6384854319 Bug 796137 - Fix QofIdType and QofIdTypeConst to work with python3
Patch by David Osguthorpe to provide typemaps so that SWIG doesn't
free buffers mem when buffer is saved as part of query struct leading
to garbage content. See https://bugs.gnucash.org/show_bug.cgi?id=796137
2018-09-08 09:31:45 +02:00
John Ralls
d86b65183d Remove Timespec from the guile base typemap. 2018-01-20 12:35:04 -08:00
lmat
7d51089501 Changing scheme conversion to gdate to use time64 2018-01-08 13:01:29 +11:00
John Ralls
a6a46d7cdc Test struct tm* returns from gnc_gmtime and gnc_localtime
To ensure that we don't crash for dereffing a nullptr.
2017-12-26 15:10:05 -08:00
Guy Taylor
744cdac5a4 Use builtin SWIG conversions for glib types
Where possible in the Python SWIG code use the builtin SWIG conversion
code over custom code. This ensures appropriate overflow/type checking.
With this I have enabled GncNumeric from longs and tested for correct
overflow handling.

Note: This could be extended to GUILE but I am not familiar enought to
safely enable this.
2017-11-28 17:08:43 -08:00
Guy Taylor
c9c5876431 Use glib.h over custom typedefs in Python SWIG
Use the native glib.h (mainly gint, gfloat ...) over custom typedefs in
SWIG type files. This is for Python only.
2017-11-28 16:27:50 -08:00
Geert Janssens
83d14e1c1c Restructure the src directory
It is split into
- /libgnucash (for the non-gui bits)
- /gnucash (for the gui)
- /common (misc source files used by both)
- /bindings (currently only holds python bindings)

This is the first step in restructuring the code. It will need much
more fine tuning later on.
2017-08-10 18:45:00 +02:00