When called with
swig -c++ -python foo.i
on the enclosed file, swig Version 1.3.35 produces code with the wrong types
Parser::Parser::Enumerator and Parser::Parser::Token:
SWIGINTERN PyObject *_wrap_Parser_pipe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
Parser::Parser *arg1 = (Parser::Parser *) 0 ;
Parser::Parser::Enumerator< Parser::Parser::Token * > *arg2 = 0 ;
Parser::Enumerator< Parser::Token * > result;
Notice that the problem disappears if method pipe() were defined to return void.
This is still reproducible with git master:
Reproducible with git master 29367b31c8202c5cbe72e05927d77004636d6af9.
Running with
-debug-module 1
then-debug-module 2
it seems this happens somewhere in between those two stages: