From: Paul P. <pog...@gm...> - 2006-12-15 23:05:54
|
Hi, I have this in my C++ code: class Game { public: static const Game& GO; ... }; And this in SWIG file: %{ #include "board/game.hpp" %} %nodefault Game; class Game { public: static const Game GO; ... }; Is it correct at all? With reference symbol (&) it didn't show up in Python bindings at all. More importantly, I have this somewhere in Python code: assert isinstance (game, board.Game) However, passing `Game.GO' as `game' triggers an assertion failure, because that is of type `PySwigObject', not `board.Game'. Is it expected for a C++-created object? How do I work around this? SWIG is 1.3.24 here. (BTW, SWIG rocks anyway. It saved me a lot of coding! :) Paul |