[C++-sig] Pyste add_method()

Daniel Holth dholth at fastmail.fm
Thu Mar 11 19:40:24 CET 2004


I think I've found the solution to my old problem:

sync = Class("ogg::sync", "oggcc.h") # part 1

syncwrite = Function("ogg::sync_write", "oggpy_wrappers.h") # part 2
add_method(sync, "ogg::sync_write")
rename(sync.sync_write, "write")
exclude(syncwrite)

Doesn't work for me: it will say something like:
RuntimeError: no ogg::sync_write declaration found!

Instead, if I say the class is in the file that declares the wrapper,
(oggpy_wrappers.h also includes oggcc.h):

sync = Class("ogg::sync", "oggpy_wrappers.h")

(insert part 2 here)

it works nicely.

- Daniel Holth





More information about the Cplusplus-sig mailing list