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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
7f89a1d6
Commit
7f89a1d6
authored
Aug 06, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow unprefixed 'str' literals in C varargs lists
parent
0e1e8803
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
CHANGES.rst
CHANGES.rst
+2
-0
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+4
-1
tests/run/varargcall.pyx
tests/run/varargcall.pyx
+4
-1
No files found.
CHANGES.rst
View file @
7f89a1d6
...
@@ -120,6 +120,8 @@ Bugs fixed
...
@@ -120,6 +120,8 @@ Bugs fixed
* Some complex Python expressions could fail to compile inside of finally
* Some complex Python expressions could fail to compile inside of finally
clauses.
clauses.
* Unprefixed 'str' literals were not supported as C varargs arguments.
Other changes
Other changes
-------------
-------------
...
...
Cython/Compiler/ExprNodes.py
View file @
7f89a1d6
...
@@ -4799,6 +4799,9 @@ class SimpleCallNode(CallNode):
...
@@ -4799,6 +4799,9 @@ class SimpleCallNode(CallNode):
for
i
in
range
(
max_nargs
,
actual_nargs
):
for
i
in
range
(
max_nargs
,
actual_nargs
):
arg
=
args
[
i
]
arg
=
args
[
i
]
if
arg
.
type
.
is_pyobject
:
if
arg
.
type
.
is_pyobject
:
if
arg
.
type
is
str_type
:
arg_ctype
=
PyrexTypes
.
c_char_ptr_type
else
:
arg_ctype
=
arg
.
type
.
default_coerced_ctype
()
arg_ctype
=
arg
.
type
.
default_coerced_ctype
()
if
arg_ctype
is
None
:
if
arg_ctype
is
None
:
error
(
self
.
args
[
i
].
pos
,
error
(
self
.
args
[
i
].
pos
,
...
...
tests/run/varargcall.pyx
View file @
7f89a1d6
cdef
grail
(
char
*
blarg
,
...):
cdef
grail
(
c
onst
c
har
*
blarg
,
...):
pass
pass
def
swallow
():
def
swallow
():
"""
"""
>>> swallow()
>>> swallow()
"""
"""
grail
(
"spam"
)
grail
(
"spam"
)
grail
(
"spam"
,
42
)
grail
(
"spam"
,
42
)
grail
(
"spam"
,
b"abc"
)
grail
(
"spam"
,
"abc"
)
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