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
1b7dd0ba
Commit
1b7dd0ba
authored
Jun 11, 2008
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests e_powop, e_pyobinstruct, e_tempcast, e_while, nogilcmeth now pass.
parent
6f457b91
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
5 deletions
+13
-5
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+2
-1
tests/errors/e_pyobinstruct.pyx
tests/errors/e_pyobinstruct.pyx
+3
-1
tests/errors/e_tempcast.pyx
tests/errors/e_tempcast.pyx
+3
-1
tests/errors/e_while.pyx
tests/errors/e_while.pyx
+1
-1
tests/errors/nogilcmeth.pxd
tests/errors/nogilcmeth.pxd
+2
-0
tests/errors/nogilcmeth.pyx
tests/errors/nogilcmeth.pyx
+2
-1
No files found.
Cython/Compiler/ExprNodes.py
View file @
1b7dd0ba
...
...
@@ -3153,7 +3153,8 @@ class PowNode(NumBinopNode):
return
None
def
c_types_okay
(
self
,
type1
,
type2
):
return
type1
.
is_float
or
type2
.
is_float
return
(
type1
.
is_float
or
type2
.
is_float
)
and
\
NumBinopNode
.
c_types_okay
(
self
,
type1
,
type2
)
def
type_error
(
self
):
if
not
(
self
.
operand1
.
type
.
is_error
or
self
.
operand2
.
type
.
is_error
):
...
...
tests/errors/e_pyobinstruct.pyx
View file @
1b7dd0ba
cdef
object
x
cdef
struct
spam
:
object
parrot
...
...
@@ -5,5 +7,5 @@ def f():
cdef
spam
s
s
.
parrot
=
x
_ERRORS
=
u"""
/Local/Projects/D/Pyrex/Source/Tests/Errors1/e_pyobinstruct.pyx:
2
:8: C struct/union member cannot be a Python object
/Local/Projects/D/Pyrex/Source/Tests/Errors1/e_pyobinstruct.pyx:
4
:8: C struct/union member cannot be a Python object
"""
tests/errors/e_tempcast.pyx
View file @
1b7dd0ba
cdef
object
foo
,
blarg
def
foo
(
obj
):
cdef
int
*
p
p
=
<
int
*>
blarg
# okay
p
=
<
int
*>
(
foo
+
blarg
)
# error - temporary
_ERRORS
=
u"""
/Local/Projects/D/Pyrex/Source/Tests/Errors1/e_tempcast.pyx:
4:5: Casting temporary Python object to
non-Python type
/Local/Projects/D/Pyrex/Source/Tests/Errors1/e_tempcast.pyx:
6:5: Casting temporary Python object to non-numeric
non-Python type
"""
tests/errors/e_while.pyx
View file @
1b7dd0ba
...
...
@@ -2,7 +2,7 @@ def f(a, b):
cdef
int
i
break
# error
continue
# error
_ERRORS
=
u"""
_ERRORS
=
u"""
/Local/Projects/D/Pyrex/Source/Tests/Errors2/e_while.pyx:3:1: break statement not inside loop
/Local/Projects/D/Pyrex/Source/Tests/Errors2/e_while.pyx:4:1: continue statement not inside loop
"""
tests/errors/nogilcmeth.pxd
0 → 100644
View file @
1b7dd0ba
cdef
class
C
:
cdef
void
f
(
self
)
nogil
tests/errors/nogilcmeth.pyx
View file @
1b7dd0ba
...
...
@@ -3,5 +3,6 @@ cdef class C:
pass
_ERRORS
=
u"""
2:6: Signature does not match previous declaration
nogilcmeth.pyx:2:9: Signature not compatible with previous declaration
nogilcmeth.pxd:2:15: 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