From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andreas Rottmann Newsgroups: gmane.lisp.guile.devel Subject: Re: Inheriting from foreign objects Date: 30 Apr 2002 12:23:06 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <874rht7aet.fsf@alice.rhinosaur.lan> References: <873cy47mxs.fsf@alice.rhinosaur.lan> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1020162292 27612 127.0.0.1 (30 Apr 2002 10:24:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 30 Apr 2002 10:24:52 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 172UoV-0007BF-00 for ; Tue, 30 Apr 2002 12:24:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 172Uo3-0007ni-00; Tue, 30 Apr 2002 06:24:23 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 172Umx-0007j7-00 for ; Tue, 30 Apr 2002 06:23:15 -0400 Original-Received: (qmail 5429 invoked by uid 0); 30 Apr 2002 10:23:13 -0000 Original-Received: from m176p000.adsl.highway.telekom.at (HELO alice.rhinosaur.lan) (62.47.189.224) by mail.gmx.net (mp013-rz3) with SMTP; 30 Apr 2002 10:23:13 -0000 Original-Received: from andy by alice.rhinosaur.lan with local (Exim 3.35 #1 (Debian)) id 172Umo-00013d-00; Tue, 30 Apr 2002 12:23:06 +0200 Original-To: ttn@glug.org Original-To: guile-devel@gnu.org, guile-user@gnu.org In-Reply-To: Original-Lines: 60 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:566 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:566 Thien-Thi Nguyen writes: > From: Neil Jerram > Date: 10 Apr 2002 20:47:13 +0100 > > 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. > > it looks like foreign bit is set when superclass list is empty. perhaps > a good guideline would be to use at least `(list )' for `supers' > for normal operation. I can't test your statement, since I have switched to create a 'normal' class and have a special slot being a smob containing the pointer to the C++ object. > btw, it doesn't look like user-supplied ctor/dtor > are suppressed based on foreign bit in any case. > When you inherit from a 'foreign' class, the constructor/destructor fields of the new class are set NULL. I suggest you write some 'test' code that uses the various goops-related C functions, as that would both make them easier to understand and they can be validated this way. > [cc guile-user in order to ask survey question: which goops-related C > functions do people use now? the answer to this helps shape definition > of the C interface to goops -- thanks!] > I use, in my C++ <-> GOOPS bindings: scm_load_goops() scm_make() scm_basic_make_class() scm_sys_allocate_instance() scm_sys_initialize_object() scm_slot_set_x() SCM_IS_A_P() scm_add_method() scm_generic_function_methods() scm_method_procedure() scm_method_specializers() scm_slot_exists_p() scm_slot_ref() I may have overlooked some. BTW: Has anybody of the developers looked at my GOOPS-related bugreport yet? Since I have included a program documenting the bug it shouldn't be too hard to investigate... Regards, Andy -- Andreas Rottmann | Dru@ICQ | 118634484@ICQ | a.rottmann@gmx.at 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 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel