Pythonのお勉強 Part31
■ このスレッドは過去ログ倉庫に格納されています
0616デフォルトの名無しさん
2009/02/01(日) 03:27:46PyModule_AddIntConstant も結局は辞書とgeneric getattrでやってることなので、
手短にするならgetattrに定数を返す関数を登録するのがいいんじゃない?
SWIGではどうやってたんだろうと思い、気になって調べてみると、SWIGのdocumentでも
Static class members present a special problem for Python. Prior to Python-2.2,
Python classes had no support for static methods and
no version of Python supports static member variables in a manner that SWIG can utilize.
Therefore, SWIG generates wrappers that try to work around some of these issues
■ このスレッドは過去ログ倉庫に格納されています