Skip to content

Update p10_wrap_existing_c_code_with_cython.rst #353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/c15/p10_wrap_existing_c_code_with_cython.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
def gcd(unsigned int x, unsigned int y):
return csample.gcd(x,y)

对于简单的函数,你并不需要去做太多的时
对于简单的函数,你并不需要去做太多的事
Cython会生成包装代码来正确的转换参数和返回值。
绑定到属性上的C数据类型是可选的。不过,如果你包含了它们,你可以另外做一些错误检查。
例如,如果有人使用负数来调用这个函数,会抛出一个异常:
Expand Down