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
13125ee7
Commit
13125ee7
authored
Jul 14, 2021
by
Matus Valo
Committed by
GitHub
Jul 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: Use explicitely the "cython" module in examples (GH-4284)
parent
54fa2b82
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
docs/examples/tutorial/external/keyword_args_call.py
docs/examples/tutorial/external/keyword_args_call.py
+2
-3
docs/examples/tutorial/external/keyword_args_call.pyx
docs/examples/tutorial/external/keyword_args_call.pyx
+0
-1
No files found.
docs/examples/tutorial/external/keyword_args_call.py
View file @
13125ee7
import
cython
from
cython.cimports.strstr
import
strstr
def
main
():
data
:
p_char
=
"hfvcakdfagbcffvschvxcdfgccbcfhvgcsnfxjh"
data
:
cython
.
p_char
=
"hfvcakdfagbcffvschvxcdfgccbcfhvgcsnfxjh"
pos
:
p_char
=
strstr
(
needle
=
'akd'
,
haystack
=
data
)
pos
=
strstr
(
needle
=
'akd'
,
haystack
=
data
)
print
(
pos
is
not
cython
.
NULL
)
docs/examples/tutorial/external/keyword_args_call.pyx
View file @
13125ee7
cdef
extern
from
"string.h"
:
char
*
strstr
(
const
char
*
haystack
,
const
char
*
needle
)
cdef
char
*
data
=
"hfvcakdfagbcffvschvxcdfgccbcfhvgcsnfxjh"
cdef
char
*
pos
=
strstr
(
needle
=
'akd'
,
haystack
=
data
)
...
...
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