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
Gwenaël Samain
cython
Commits
59367485
Commit
59367485
authored
Jun 11, 2008
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix crash for scope=None compilation error, more strict literal char* -> int
parent
a68841b6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+4
-3
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+2
-0
tests/errors/e_cmethbasematch.pyx
tests/errors/e_cmethbasematch.pyx
+1
-1
No files found.
Cython/Compiler/ExprNodes.py
View file @
59367485
...
...
@@ -3543,9 +3543,10 @@ class PrimaryCmpNode(ExprNode, CmpNode):
or
(
self
.
cascade
and
self
.
cascade
.
has_int_operands
())
def
coerce_chars_to_ints
(
self
,
env
):
if
self
.
operand1
.
type
.
is_string
:
# coerce literal single-char strings to c chars
if
self
.
operand1
.
type
.
is_string
and
isinstance
(
self
.
operand1
,
StringNode
):
self
.
operand1
=
self
.
operand1
.
coerce_to
(
PyrexTypes
.
c_uchar_type
,
env
)
if
self
.
operand2
.
type
.
is_string
:
if
self
.
operand2
.
type
.
is_string
and
isinstance
(
self
.
operand2
,
StringNode
)
:
self
.
operand2
=
self
.
operand2
.
coerce_to
(
PyrexTypes
.
c_uchar_type
,
env
)
if
self
.
cascade
:
self
.
cascade
.
coerce_chars_to_ints
(
env
)
...
...
@@ -3636,7 +3637,7 @@ class CascadedCmpNode(Node, CmpNode):
return
self
.
operand2
.
type
.
is_int
def
coerce_chars_to_ints
(
self
,
env
):
if
self
.
operand2
.
type
.
is_string
:
if
self
.
operand2
.
type
.
is_string
and
isinstance
(
self
.
operand2
,
StringNode
)
:
self
.
operand2
=
self
.
operand2
.
coerce_to
(
PyrexTypes
.
c_uchar_type
,
env
)
def
coerce_cascaded_operands_to_temp
(
self
,
env
):
...
...
Cython/Compiler/Nodes.py
View file @
59367485
...
...
@@ -196,6 +196,8 @@ class BlockNode:
del
entries
[:]
def
generate_py_string_decls
(
self
,
env
,
code
):
if
env
is
None
:
return
# earlier error
entries
=
env
.
pystring_entries
if
entries
:
code
.
putln
(
""
)
...
...
tests/errors/e_cmethbasematch.pyx
View file @
59367485
...
...
@@ -6,6 +6,6 @@ cdef class D(C):
cdef
void
f
(
self
,
int
x
):
pass
_ERRORS
=
u"""
/Local/Projects/D/Pyrex/Source/Tests/Errors3/e_cmethbasematch.pyx:6:6: Signature
does not matc
h previous declaration
/Local/Projects/D/Pyrex/Source/Tests/Errors3/e_cmethbasematch.pyx:6:6: Signature
not compatible wit
h previous declaration
/Local/Projects/D/Pyrex/Source/Tests/Errors3/e_cmethbasematch.pyx:2:6: Previous declaration is here
"""
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