Tag: python 3.2

PyFile_Type替换为..?

我正在为Python 3.2编译Yenc 。 我注意到gcc抱怨一个非声明的函数PyString_Type ,所以我用替换的PyBytes_Type替换它,如文档所示 。 然而,gcc还抱怨称为PyFile_Type的未声明函数。 我google了一下,发现: Python 3.x replaces the PyFile_Type extension type with an abstract interface and specific implementation types. Unfortunately it doesn’t make any of this directly available with a C level api. 资源 我绝不是一个C程序员,这让我无法解决这个问题。 我该怎么做才能解决这个问题? 编辑: 编译输出 , _yenc.c 谢谢!