Python 3 default args fix
Fix 0U and 0L as default args for Python 3 (tests committed in previously commit of default_args.i). Relates to issue #294.
This commit is contained in:
parent
9d87b9f099
commit
944fbfb426
2 changed files with 11 additions and 3 deletions
|
|
@ -1923,9 +1923,11 @@ public:
|
|||
// to be "0o" in Python 3 only (and as long as we still support Python
|
||||
// 2.5, this can't be done unconditionally).
|
||||
if (py3) {
|
||||
String *res = NewString("0o");
|
||||
Append(res, NewStringWithSize(s + 1, end - s - 1));
|
||||
return res;
|
||||
if (end - s > 1) {
|
||||
String *res = NewString("0o");
|
||||
Append(res, NewStringWithSize(s + 1, end - s - 1));
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue