Python 2.5 编译simplejson

https://github.com/simplejson/simplejson/issues/#issue/5/comment/963728

在_speedups.c文件的20行后插入如下代码,原因是Py_SIZE在2.6中才存在

 

#if PY_VERSION_HEX < 0x02060000 && !defined(Py_SIZE)

#define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) 

#endif

 

最初来源:http://www.mail-archive.com/dulwich-users@lists.launchpad.net/msg00352.html


类别:默认分类 查看评论
posted @ 2011-04-06 20:40  ayanamist  阅读(321)  评论(0编辑  收藏  举报