[C++-sig] Re: Pyste-generated extentsion Aborts Python
Nicodemus
nicodemus at globalite.com.br
Fri Jul 4 03:39:05 CEST 2003
Jim Wilson wrote:
> Nicodemus,
>
> You wrote (regarding my abbreviated class Fl):
>
>> This does not seems like a good idea... the policies are *really*
>> needed. If you want to expose only a few functions, then you can
>> always exclude() the ones that you don't want.
>
>
> I revised my fltk.h:
>
> #include </usr/local/include/FL/Fl.H> // Where my FLTK
> #include </usr/local/include/FL/Fl_Window.H> // headers reside
>
> and fltk.pyste (to exclude the troublesom functions):
>
> f = Class("Fl", "fltk.h")
> exclude(f.readqueue)
> exclude(f.first_window)
> exclude(f.next_window)
> exclude(f.modal)
> exclude(f.grab)
> exclude(f.belowmouse)
> exclude(f.pushed)
> exclude(f.focus)
> exclude(f.selection_owner)
> exclude(f.get_boxtype)
> w = Class("Fl_Window", "fltk.h")
> exclude(w.icon)
> exclude(w.child)
> exclude(w.current)
> exclude(w.array)
> exclude(w.resizable)
> exclude(w._ddfdesign_kludge)
>
> And *now* I remember why I did it the way I did. Pyste silently
> generates (a somewhat longer) fltk.cpp (available renamed) at:
>
> http://www.afn.org/~wilson/fltk.cxx
>
> But when compiling it, gcc goes berserk and generates all sorts of
> cryptic template diagnostics. Since I don't understand templates,
> I'm hopelessly lost! Hence my pragmatism ;).
Oh yeah... if you export a class down in the hiearchy and don't export
the classes that are above it, Pyste will export the methods of the base
classes as methods of the derived class. This allow you to export only
the class that you are interested, instead to have to export all its
base classes too.
If it is generating problems tought, then it is probably a bug. The
first lines of the error messages normally tell what is wrong... if you
could post this, it would be great. 8)
More information about the Cplusplus-sig
mailing list