mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-08 04:50:07 +01:00
10
build.py
10
build.py
@@ -75,12 +75,12 @@ wxICON = 'docs/sphinx/_static/images/sphinxdocs/mondrian.png'
|
||||
|
||||
# Some tools will be downloaded for the builds. These are the versions and
|
||||
# MD5s of the tool binaries currently in use.
|
||||
sipCurrentVersion = '4.19.5'
|
||||
sipCurrentVersion = '4.19.7'
|
||||
sipMD5 = {
|
||||
'darwin' : '06308e0a0d3735992a53986fe99bde07',
|
||||
'win32' : '107f2bbac5445f2a3c5df64000b1e1c3',
|
||||
'linux32' : '6dc2998b10c1e81bbc5cb9bd007f9345',
|
||||
'linux64' : '62104b11351b00da3dd5ed6094a2c744',
|
||||
'darwin' : 'd30ca1ffb09c0dbb6326e99d012c55b8',
|
||||
'win32' : 'dbb882f4f95b1a7419a436280407899c',
|
||||
'linux32' : '56a763acdf7c0b5725b31a71a9a56160',
|
||||
'linux64' : 'b349127a4d46452936e4181d96b12c2d',
|
||||
}
|
||||
|
||||
wafCurrentVersion = '1.7.15-p1'
|
||||
|
||||
@@ -32,10 +32,12 @@ def run():
|
||||
# Tweak the parsed meta objects in the module object as needed for
|
||||
# customizing the generated code and docstrings.
|
||||
|
||||
# In the C++ code the wxFSW_EVENT_UNMOUNT item is only part of the enum
|
||||
# for platforms that have INOTIFY so we need to fake it elsewhere.
|
||||
module.addHeaderCode("""
|
||||
#include <wx/fswatcher.h>
|
||||
#ifndef wxHAS_INOTIFY
|
||||
#define wxFSW_EVENT_UNMOUNT 0x2000
|
||||
const int wxFSW_EVENT_UNMOUNT = 0x2000;
|
||||
#endif
|
||||
""")
|
||||
|
||||
|
||||
@@ -54,8 +54,8 @@ extern "C" {
|
||||
/*
|
||||
* Define the SIP version number.
|
||||
*/
|
||||
#define SIP_VERSION 0x041305
|
||||
#define SIP_VERSION_STR "4.19.5"
|
||||
#define SIP_VERSION 0x041307
|
||||
#define SIP_VERSION_STR "4.19.7"
|
||||
|
||||
|
||||
/*
|
||||
@@ -1460,6 +1460,8 @@ typedef struct _sipCharInstanceDef {
|
||||
|
||||
/*
|
||||
* The information describing a string instance to be added to a dictionary.
|
||||
* This is also used as a hack to add (or fix) other types rather than add a
|
||||
* new table type and so requiring a new major version of the API.
|
||||
*/
|
||||
typedef struct _sipStringInstanceDef {
|
||||
/* The string name. */
|
||||
@@ -1468,7 +1470,10 @@ typedef struct _sipStringInstanceDef {
|
||||
/* The string value. */
|
||||
const char *si_val;
|
||||
|
||||
/* The encoding used, either 'A', 'L', '8' or 'N'. */
|
||||
/*
|
||||
* The encoding used, either 'A', 'L', '8' or 'N'. 'w' and 'W' are also
|
||||
* used to support the fix for wchar_t.
|
||||
*/
|
||||
char si_encoding;
|
||||
} sipStringInstanceDef;
|
||||
|
||||
|
||||
@@ -4579,7 +4579,7 @@ static int parsePass1(PyObject **parseErrp, sipSimpleWrapper **selfp,
|
||||
case 'F':
|
||||
{
|
||||
/* Python callable object. */
|
||||
|
||||
|
||||
PyObject **p = va_arg(va, PyObject **);
|
||||
|
||||
if (arg != NULL)
|
||||
@@ -4595,14 +4595,14 @@ static int parsePass1(PyObject **parseErrp, sipSimpleWrapper **selfp,
|
||||
Py_INCREF(arg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 'H':
|
||||
{
|
||||
/* Python callable object or None. */
|
||||
|
||||
|
||||
PyObject **p = va_arg(va, PyObject **);
|
||||
|
||||
if (arg != NULL)
|
||||
@@ -4618,14 +4618,14 @@ static int parsePass1(PyObject **parseErrp, sipSimpleWrapper **selfp,
|
||||
Py_INCREF(arg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case '!':
|
||||
{
|
||||
/* Python object that implements the buffer protocol. */
|
||||
|
||||
|
||||
PyObject **p = va_arg(va, PyObject **);
|
||||
|
||||
if (arg != NULL)
|
||||
@@ -4647,7 +4647,7 @@ static int parsePass1(PyObject **parseErrp, sipSimpleWrapper **selfp,
|
||||
Py_INCREF(arg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -4656,7 +4656,7 @@ static int parsePass1(PyObject **parseErrp, sipSimpleWrapper **selfp,
|
||||
/*
|
||||
* Python object that implements the buffer protocol or None.
|
||||
*/
|
||||
|
||||
|
||||
PyObject **p = va_arg(va, PyObject **);
|
||||
|
||||
if (arg != NULL)
|
||||
@@ -4678,7 +4678,7 @@ static int parsePass1(PyObject **parseErrp, sipSimpleWrapper **selfp,
|
||||
Py_INCREF(arg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -7124,7 +7124,7 @@ static int isNonlazyMethod(PyMethodDef *pmd)
|
||||
"__aexit__",
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
};
|
||||
|
||||
const char **l;
|
||||
|
||||
@@ -8464,6 +8464,27 @@ static int addStringInstances(PyObject *dict, sipStringInstanceDef *si)
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 'w':
|
||||
/* The hack for wchar_t. */
|
||||
#if defined(HAVE_WCHAR_H)
|
||||
w = PyUnicode_FromWideChar((const wchar_t *)si->si_val, 1);
|
||||
break;
|
||||
#else
|
||||
raiseNoWChar();
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
case 'W':
|
||||
/* The hack for wchar_t*. */
|
||||
#if defined(HAVE_WCHAR_H)
|
||||
w = PyUnicode_FromWideChar((const wchar_t *)si->si_val,
|
||||
wcslen((const wchar_t *)si->si_val));
|
||||
break;
|
||||
#else
|
||||
raiseNoWChar();
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
default:
|
||||
w = SIPBytes_FromString(si->si_val);
|
||||
}
|
||||
@@ -9659,11 +9680,11 @@ void sipSaveMethod(sipPyMethod *pm, PyObject *meth)
|
||||
static void sip_api_call_hook(const char *hookname)
|
||||
{
|
||||
PyObject *dictofmods, *mod, *dict, *hook, *res;
|
||||
|
||||
|
||||
/* Get the dictionary of modules. */
|
||||
if ((dictofmods = PyImport_GetModuleDict()) == NULL)
|
||||
return;
|
||||
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
/* Get the builtins module. */
|
||||
if ((mod = PyDict_GetItemString(dictofmods, "builtins")) == NULL)
|
||||
@@ -9673,18 +9694,18 @@ static void sip_api_call_hook(const char *hookname)
|
||||
if ((mod = PyDict_GetItemString(dictofmods, "__builtin__")) == NULL)
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
||||
/* Get it's dictionary. */
|
||||
if ((dict = PyModule_GetDict(mod)) == NULL)
|
||||
return;
|
||||
|
||||
|
||||
/* Get the function hook. */
|
||||
if ((hook = PyDict_GetItemString(dict, hookname)) == NULL)
|
||||
return;
|
||||
|
||||
|
||||
/* Call the hook and discard any result. */
|
||||
res = PyObject_Call(hook, empty_tuple, NULL);
|
||||
|
||||
|
||||
Py_XDECREF(res);
|
||||
}
|
||||
|
||||
@@ -10522,7 +10543,7 @@ static int sipSimpleWrapper_init(sipSimpleWrapper *self, PyObject *args,
|
||||
*/
|
||||
new_unused_p = &new_unused;
|
||||
}
|
||||
|
||||
|
||||
if (final_func((PyObject *)self, sipNew, unused, new_unused_p) < 0)
|
||||
{
|
||||
Py_XDECREF(unused);
|
||||
@@ -11315,7 +11336,7 @@ static int sipSimpleWrapper_set_dict(sipSimpleWrapper *sw, PyObject *value,
|
||||
}
|
||||
|
||||
Py_XDECREF(sw->dict);
|
||||
|
||||
|
||||
Py_XINCREF(value);
|
||||
sw->dict = value;
|
||||
|
||||
@@ -11985,7 +12006,7 @@ static void forgetObject(sipSimpleWrapper *sw)
|
||||
}
|
||||
|
||||
/*
|
||||
* This is needed because we release the GIL when calling a C++ dtor.
|
||||
* This is needed because we might release the GIL when calling a C++ dtor.
|
||||
* Without it the cyclic garbage collector can be invoked from another
|
||||
* thread resulting in a crash.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user