mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[c++ options] Rearrange header includes to avoid windows.h conflicts.
Since SWIG guile pulls in libguile early the options headers must be included in a begin block.
This commit is contained in:
parent
d4a1fb92a6
commit
61673ec919
@ -66,8 +66,6 @@ extern "C"
|
|||||||
%{
|
%{
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#include "guile-mappings.h"
|
|
||||||
|
|
||||||
SCM scm_init_sw_engine_module (void);
|
SCM scm_init_sw_engine_module (void);
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
@ -62,18 +62,32 @@ namespace std {
|
|||||||
%typemap(in) std::size_t "$1 = scm_to_ulong($input);";
|
%typemap(in) std::size_t "$1 = scm_to_ulong($input);";
|
||||||
%typemap(out) std::size_t "$result = scm_from_ulong($1);";
|
%typemap(out) std::size_t "$result = scm_from_ulong($1);";
|
||||||
|
|
||||||
|
%begin
|
||||||
%{
|
%{
|
||||||
#include "gnc-optiondb.h"
|
#include <gnc-optiondb.h>
|
||||||
#include "gnc-optiondb.hpp"
|
#include <gnc-optiondb.hpp>
|
||||||
#include "gnc-optiondb-impl.hpp"
|
#include <gnc-optiondb-impl.hpp>
|
||||||
#include "gnc-option-date.hpp"
|
#include <gnc-option-date.hpp>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
#include <guile-mappings.h>
|
||||||
|
%}
|
||||||
|
%{
|
||||||
static const QofLogModule log_module = "gnc.optiondb";
|
static const QofLogModule log_module = "gnc.optiondb";
|
||||||
|
|
||||||
SCM scm_init_sw_gnc_optiondb_module(void);
|
SCM scm_init_sw_gnc_optiondb_module(void);
|
||||||
|
/*Windows.h defines ERROR but SWIG needs it to, so undef it. */
|
||||||
|
#ifdef ERROR
|
||||||
|
#undef ERROR
|
||||||
|
#endif
|
||||||
|
/*Something somewhere in windows.h defines ABSOLUTE to something and
|
||||||
|
*that contaminates using it in RelativeDateType. Undef it.
|
||||||
|
*/
|
||||||
|
#ifdef ABSOLUTE
|
||||||
|
#undef ABSOLUTE
|
||||||
|
#endif
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%ignore gnc_get_current_session(void);
|
%ignore gnc_get_current_session(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user