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
Xavier Thompson
cython
Commits
a0819490
Commit
a0819490
authored
7 years ago
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extend fastcall tests with more Python calls that use METH_FASTCALL in Py3.6+
parent
a47034e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
tests/run/fastcall.pyx
tests/run/fastcall.pyx
+15
-0
No files found.
tests/run/fastcall.pyx
View file @
a0819490
# mode: run
# tag: METH_FASTCALL
import
struct
from
collections
import
deque
...
...
@@ -19,3 +20,17 @@ def deque_methods(v):
assert
list
(
d
)
==
[
1
,
2
,
3
,
4
]
return
list
(
d
)
def
struct_methods
(
v
):
"""
>>> i, lf = struct_methods(2)
>>> struct.unpack('i', i)
(2,)
>>> struct.unpack('lf', lf)
(2, 4.0)
"""
return
[
struct
.
pack
(
'i'
,
v
),
struct
.
pack
(
'lf'
,
v
,
v
*
2
),
]
This diff is collapsed.
Click to expand it.
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