Update p10_wrap_existing_c_code_with_cython.rst

改一个错别字
This commit is contained in:
Leeway
2021-07-15 15:28:29 +08:00
committed by GitHub
parent a9cd77b989
commit e96e47fd2e

View File

@@ -178,7 +178,7 @@
def gcd(unsigned int x, unsigned int y):
return csample.gcd(x,y)
对于简单的函数,你并不需要去做太多的
对于简单的函数,你并不需要去做太多的
Cython会生成包装代码来正确的转换参数和返回值。
绑定到属性上的C数据类型是可选的。不过如果你包含了它们你可以另外做一些错误检查。
例如,如果有人使用负数来调用这个函数,会抛出一个异常: