[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inheriting from foreign objects
From: |
Neil Jerram |
Subject: |
Re: Inheriting from foreign objects |
Date: |
10 Apr 2002 20:47:13 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
>>>>> "Andreas" == Andreas Rottmann <address@hidden> writes:
Andreas> Hi!
Andreas> I have run into a problem: I create classes from C (C++) using
Andreas> scm_make_class(). These classes all get the SCM_CLASSF_FOREIGN bit
set
Andreas> to treat them as foreign objects (like invoke the constructor &
Andreas> desctructor supplied).
Andreas> So far, so good. However, when I derive from these classes (on the
Andreas> Scheme level), the new class has also the FOREIGN bit set (it's
Andreas> inherited in scm_sys_inherit_magic_x(), AFAICT), but the
constructor
Andreas> set NULL, which causes %allocate-instance bails out when trying to
Andreas> instantiate the class.
Andreas> Is there a way I can cleanly derive from C-created classes?
I'd say you're in virgin territory here, and that any advice you can
give on such problems, and on defining a C API for GOOPS, would be
very useful.
(Sorry that wasn't much help! Good luck.)
Neil