Skip to content

Commit

Permalink
Switch to 4.19.7.dev1801141749 on darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinD42 committed Jan 15, 2018
1 parent 5f1ee01 commit 1d8d9aa
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@

# 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.dev1801141749'
sipMD5 = {
'darwin' : '06308e0a0d3735992a53986fe99bde07',
'darwin' : '9f2c414004ec4b98d6d6bb4d5fe9fb85',
'win32' : '107f2bbac5445f2a3c5df64000b1e1c3',
'linux32' : '6dc2998b10c1e81bbc5cb9bd007f9345',
'linux64' : '62104b11351b00da3dd5ed6094a2c744',
Expand Down
11 changes: 8 additions & 3 deletions sip/siplib/sip.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.dev1801141749"


/*
Expand Down Expand Up @@ -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. */
Expand All @@ -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;

Expand Down
21 changes: 21 additions & 0 deletions sip/siplib/siplib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 1d8d9aa

Please sign in to comment.