guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Inheriting from foreign objects


From: Andreas Rottmann
Subject: Inheriting from foreign objects
Date: 09 Apr 2002 20:21:19 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Hi!

I have run into a problem: I create classes from C (C++) using
scm_make_class(). These classes all get the SCM_CLASSF_FOREIGN bit set
to treat them as foreign objects (like invoke the constructor &
desctructor supplied). 

So far, so good. However, when I derive from these classes (on the
Scheme level), the new class has also the FOREIGN bit set (it's
inherited in scm_sys_inherit_magic_x(), AFAICT), but the constructor
set NULL, which causes %allocate-instance bails out when trying to
instantiate the class.

Is there a way I can cleanly derive from C-created classes?

BTW, I'm using the current CVS code.

Regards, Andy
-- 
Andreas Rottmann         | address@hidden        | address@hidden | 
address@hidden
http://www.8ung.at/rotty | GnuPG Key: http://www.8ung.at/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62



reply via email to

[Prev in Thread] Current Thread [Next in Thread]