diff options
-rw-r--r-- | gi/pygi-basictype.c | 16 | ||||
-rw-r--r-- | gi/pygi-cache.c | 3 | ||||
-rw-r--r-- | gi/pygi-enum-marshal.c | 16 |
3 files changed, 18 insertions, 17 deletions
diff --git a/gi/pygi-basictype.c b/gi/pygi-basictype.c index 6fbe9292..c9606a93 100644 --- a/gi/pygi-basictype.c +++ b/gi/pygi-basictype.c @@ -25,6 +25,22 @@ #include "pygi-argument.h" #include "pygi-private.h" +#ifdef G_OS_WIN32 +#ifdef _MSC_VER +#include <math.h> + +#ifndef NAN +static const unsigned long __nan[2] = {0xffffffff, 0x7fffffff}; +#define NAN (*(const float *) __nan) +#endif + +#ifndef INFINITY +#define INFINITY HUGE_VAL +#endif + +#endif +#endif + /* * From Python Marshaling diff --git a/gi/pygi-cache.c b/gi/pygi-cache.c index 8055c155..abf8e100 100644 --- a/gi/pygi-cache.c +++ b/gi/pygi-cache.c @@ -475,6 +475,7 @@ _args_cache_generate (GICallableInfo *callable_info, GITransfer return_transfer; PyGIArgCache *return_cache; PyGIDirection return_direction; + gssize last_explicit_arg_index; /* Return arguments are always considered out */ return_direction = _pygi_get_direction (callable_cache, GI_DIRECTION_OUT); @@ -637,7 +638,7 @@ _args_cache_generate (GICallableInfo *callable_info, callable_cache->n_py_required_args = 0; callable_cache->user_data_varargs_index = -1; - gssize last_explicit_arg_index = -1; + last_explicit_arg_index = -1; /* Reverse loop through all the arguments to setup arg_name_list/hash * and find the number of required arguments */ diff --git a/gi/pygi-enum-marshal.c b/gi/pygi-enum-marshal.c index dec59243..32ca9dcd 100644 --- a/gi/pygi-enum-marshal.c +++ b/gi/pygi-enum-marshal.c @@ -25,22 +25,6 @@ #include "pygi-enum-marshal.h" #include "pygi-private.h" -#ifdef _WIN32 -#ifdef _MSC_VER -#include <math.h> - -#ifndef NAN -static const unsigned long __nan[2] = {0xffffffff, 0x7fffffff}; -#define NAN (*(const float *) __nan) -#endif - -#ifndef INFINITY -#define INFINITY HUGE_VAL -#endif - -#endif -#endif - static gboolean gi_argument_from_c_long (GIArgument *arg_out, long c_long_in, |