mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-08 21:10:06 +01:00
Merge branch 'fix_defines_better' of https://github.com/swt2c/Phoenix into pr45-alternate
This commit is contained in:
12
build.py
12
build.py
@@ -1023,6 +1023,18 @@ def cmd_sip(options, args):
|
||||
# ...or totally remove them by replacing those lines with ''
|
||||
import re
|
||||
srcTxt = re.sub(r'^#line.*\n', '', srcTxt, flags=re.MULTILINE)
|
||||
# Perform a couple of manual modifications to the generated cpp
|
||||
# to fix C++11 compilation errors.
|
||||
if os.path.basename(src) == 'sip_corecmodule.cpp':
|
||||
srcTxt = srcTxt.replace('wxCANCEL_DEFAULT},',
|
||||
'static_cast<int>(wxCANCEL_DEFAULT)},')
|
||||
srcTxt = srcTxt.replace('wxVSCROLL},',
|
||||
'static_cast<int>(wxVSCROLL)},')
|
||||
srcTxt = srcTxt.replace('wxWINDOW_STYLE_MASK},',
|
||||
'static_cast<int>(wxWINDOW_STYLE_MASK)},')
|
||||
if os.path.basename(src) == 'sip_stccmodule.cpp':
|
||||
srcTxt = srcTxt.replace('wxSTC_MASK_FOLDERS},',
|
||||
'static_cast<int>(wxSTC_MASK_FOLDERS)},')
|
||||
return srcTxt
|
||||
|
||||
# Check each file in tmpdir to see if it is different than the same file
|
||||
|
||||
@@ -123,9 +123,6 @@ def run():
|
||||
return rv;
|
||||
""")
|
||||
|
||||
# Correct the type for this define as its value is outside the range of int
|
||||
module.find('wxSTC_MASK_FOLDERS').type = 'unsigned long'
|
||||
|
||||
# TODO: Add the UTF8 PyMethods from classic (see _stc_utf8_methods.py)
|
||||
|
||||
|
||||
|
||||
@@ -44,13 +44,10 @@ def run():
|
||||
module.find('wxUIntPtr').ignore()
|
||||
|
||||
# Correct the types for these as their values are outside the range of int
|
||||
module.find('wxUINT32_MAX').type = 'long'
|
||||
module.find('wxUINT32_MAX').type = 'unsigned long'
|
||||
module.find('wxINT64_MIN').type = 'long long'
|
||||
module.find('wxINT64_MAX').type = 'long long'
|
||||
module.find('wxUINT64_MAX').type = 'unsigned long long'
|
||||
module.find('wxCANCEL_DEFAULT').type = 'unsigned long'
|
||||
module.find('wxWINDOW_STYLE_MASK').type = 'unsigned long'
|
||||
module.find('wxVSCROLL').type = 'unsigned long'
|
||||
|
||||
module.find('wxInt8').pyInt = True
|
||||
module.find('wxUint8').pyInt = True
|
||||
|
||||
Reference in New Issue
Block a user