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
Boxiang Sun
cython
Commits
c9f2f977
Commit
c9f2f977
authored
Jan 14, 2011
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:cython/cython
parents
fd9df8e5
ccc69c11
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
tests/run/type_inference.pyx
tests/run/type_inference.pyx
+11
-2
No files found.
tests/run/type_inference.pyx
View file @
c9f2f977
...
...
@@ -210,14 +210,14 @@ def builtin_type_methods():
append
(
1
)
assert
l
==
[
1
],
str
(
l
)
cdef
int
func
(
int
x
):
cdef
int
c
func
(
int
x
):
return
x
+
1
def
c_functions
():
"""
>>> c_functions()
"""
f
=
func
f
=
c
func
assert
typeof
(
f
)
==
'int (*)(int)'
,
typeof
(
f
)
assert
2
==
f
(
1
)
...
...
@@ -424,6 +424,15 @@ def safe_only():
res
=
-
j
assert
typeof
(
j
)
==
"Python object"
,
typeof
(
j
)
@
infer_types
(
None
)
def
safe_c_functions
():
"""
>>> safe_c_functions()
"""
f
=
cfunc
assert
typeof
(
f
)
==
'int (*)(int)'
,
typeof
(
f
)
assert
2
==
f
(
1
)
@
infer_types
(
None
)
def
args_tuple_keywords
(
*
args
,
**
kwargs
):
"""
...
...
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