Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
76c776f4
Commit
76c776f4
authored
Aug 21, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Py3 unicode fixes
parent
8371e5da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+7
-7
No files found.
Cython/Compiler/Nodes.py
View file @
76c776f4
...
@@ -1839,7 +1839,7 @@ class DefNode(FuncDefNode):
...
@@ -1839,7 +1839,7 @@ class DefNode(FuncDefNode):
return
return
if
self
.
entry
.
doc
and
Options
.
docstrings
:
if
self
.
entry
.
doc
and
Options
.
docstrings
:
docstr
=
self
.
entry
.
doc
docstr
=
self
.
entry
.
doc
if
not
isinstance
(
docstr
,
str
)
:
if
docstr
.
is_unicode
:
docstr
=
docstr
.
utf8encode
()
docstr
=
docstr
.
utf8encode
()
code
.
putln
(
code
.
putln
(
'static char %s[] = "%s";'
%
(
'static char %s[] = "%s";'
%
(
...
@@ -1972,7 +1972,7 @@ class DefNode(FuncDefNode):
...
@@ -1972,7 +1972,7 @@ class DefNode(FuncDefNode):
code
.
putln
(
"if (unlikely(PyTuple_GET_SIZE(%s) > 0)) {"
%
code
.
putln
(
"if (unlikely(PyTuple_GET_SIZE(%s) > 0)) {"
%
Naming
.
args_cname
)
Naming
.
args_cname
)
code
.
put
(
'__Pyx_RaiseArgtupleInvalid("%s", 1, 0, 0, PyTuple_GET_SIZE(%s)); return %s;'
%
(
code
.
put
(
'__Pyx_RaiseArgtupleInvalid("%s", 1, 0, 0, PyTuple_GET_SIZE(%s)); return %s;'
%
(
self
.
name
.
utf8encode
()
,
Naming
.
args_cname
,
self
.
error_value
()))
self
.
name
,
Naming
.
args_cname
,
self
.
error_value
()))
code
.
putln
(
"}"
)
code
.
putln
(
"}"
)
code
.
globalstate
.
use_utility_code
(
keyword_string_check_utility_code
)
code
.
globalstate
.
use_utility_code
(
keyword_string_check_utility_code
)
...
@@ -2062,7 +2062,7 @@ class DefNode(FuncDefNode):
...
@@ -2062,7 +2062,7 @@ class DefNode(FuncDefNode):
pystring_cname
=
code
.
intern_identifier
(
arg
.
name
)
pystring_cname
=
code
.
intern_identifier
(
arg
.
name
)
# required keyword-only argument missing
# required keyword-only argument missing
code
.
put
(
'__Pyx_RaiseKeywordRequired("%s", %s); '
%
(
code
.
put
(
'__Pyx_RaiseKeywordRequired("%s", %s); '
%
(
self
.
name
.
utf8encode
()
,
self
.
name
,
pystring_cname
))
pystring_cname
))
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
break
break
...
@@ -2112,7 +2112,7 @@ class DefNode(FuncDefNode):
...
@@ -2112,7 +2112,7 @@ class DefNode(FuncDefNode):
code
.
put_goto
(
success_label
)
code
.
put_goto
(
success_label
)
code
.
put_label
(
argtuple_error_label
)
code
.
put_label
(
argtuple_error_label
)
code
.
put
(
'__Pyx_RaiseArgtupleInvalid("%s", %d, %d, %d, PyTuple_GET_SIZE(%s)); '
%
(
code
.
put
(
'__Pyx_RaiseArgtupleInvalid("%s", %d, %d, %d, PyTuple_GET_SIZE(%s)); '
%
(
self
.
name
.
utf8encode
()
,
has_fixed_positional_count
,
self
.
name
,
has_fixed_positional_count
,
min_positional_args
,
max_positional_args
,
min_positional_args
,
max_positional_args
,
Naming
.
args_cname
))
Naming
.
args_cname
))
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
...
@@ -2237,14 +2237,14 @@ class DefNode(FuncDefNode):
...
@@ -2237,14 +2237,14 @@ class DefNode(FuncDefNode):
# arguments up to this point
# arguments up to this point
code
.
putln
(
'else {'
)
code
.
putln
(
'else {'
)
code
.
put
(
'__Pyx_RaiseArgtupleInvalid("%s", %d, %d, %d, %d); '
%
(
code
.
put
(
'__Pyx_RaiseArgtupleInvalid("%s", %d, %d, %d, %d); '
%
(
self
.
name
.
utf8encode
()
,
has_fixed_positional_count
,
self
.
name
,
has_fixed_positional_count
,
min_positional_args
,
max_positional_args
,
i
))
min_positional_args
,
max_positional_args
,
i
))
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
code
.
putln
(
'}'
)
code
.
putln
(
'}'
)
elif
arg
.
kw_only
:
elif
arg
.
kw_only
:
code
.
putln
(
'else {'
)
code
.
putln
(
'else {'
)
code
.
put
(
'__Pyx_RaiseKeywordRequired("%s", %s); '
%
(
code
.
put
(
'__Pyx_RaiseKeywordRequired("%s", %s); '
%
(
self
.
name
.
utf8encode
()
,
pystring_cname
))
self
.
name
,
pystring_cname
))
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
code
.
putln
(
'}'
)
code
.
putln
(
'}'
)
if
max_positional_args
>
0
:
if
max_positional_args
>
0
:
...
@@ -2297,7 +2297,7 @@ class DefNode(FuncDefNode):
...
@@ -2297,7 +2297,7 @@ class DefNode(FuncDefNode):
Naming
.
pykwdlist_cname
,
Naming
.
pykwdlist_cname
,
self
.
starstar_arg
and
self
.
starstar_arg
.
entry
.
cname
or
'0'
,
self
.
starstar_arg
and
self
.
starstar_arg
.
entry
.
cname
or
'0'
,
pos_arg_count
,
pos_arg_count
,
self
.
name
.
utf8encode
()
))
self
.
name
))
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
code
.
putln
(
'}'
)
code
.
putln
(
'}'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment