Commit 13125ee7 authored by Matus Valo's avatar Matus Valo Committed by GitHub

docs: Use explicitely the "cython" module in examples (GH-4284)

parent 54fa2b82
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)
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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment