[C++-sig] Re: Pyste-generated extentsion Aborts Python

Jim Wilson wilson at afn.org
Wed Jul 9 00:07:20 CEST 2003


Nicodemus,

I fetched your latest sources from CVS, and sure enough, no more boost
error.  I'm back to Python's "Abort".  (More about that below.)  Thanks
for your prompt attention.

You wrote:

> Why the other functions didn't compile is still a mistery. Could you 
> post the signature of one of them, along with the generated code for 
> that function?

Your wish is my command!  (At least if I understand your wish.  I think
you wanted the declarations of the offending functions?)

I have pared down the .h file to just the malicious functions (several of
them pointers to nasty functions that take "..." as an argument!) and added
necessary declarations from included files.  The 50-line file at:

	http://www.afn.org/~wilson/fltk.h

is silently digested by Pyste under the one-liner:

	http://www.afn.org/~wilson/fltk.pyste

but Pyste's output:

	http://www.afn.org/~wilson/fltk.cpp

hits the error jackpot in g++.

Now, regarding the Python "Abort".  I broke out gdb and discovered the
abort happens while executing a wrapper-overridden virtual function (of an 
Fl_Window).  I was able to get my demonstration program to run by simply
excluding the virtual function!  That's good news for my little demo; it's
bad news for someone who might want to extend an Fl_Window subclass in Python.

Now, Dave may be right.  FLTK may be biting Python, and Python just bites
back.  Still, I think I would have seen a segfault or two out of FLTK
when I "wrap" it in C++.

Jim Wilson









More information about the Cplusplus-sig mailing list