swarm-support
[Top][All Lists]
Advanced

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

Re: defobj follow up/ Reflective objects


From: Marcus G. Daniels
Subject: Re: defobj follow up/ Reflective objects
Date: 05 Jun 2000 10:14:10 -0700
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "PJ" == Paul E Johnson <address@hidden> writes:

PJ> Looking at the -lispOutShallow: method in DefClass.m, I don't
PJ> understand why this will not work.

PJ>    struct objc_ivar_list *ivars = ((Class_s *) self)->ivarList;
PJ>    unsigned count = ivars->ivar_count;
PJ>    printf ("ivar count %d ", count);

One reason this might break would be if `self' was a normal object
and not a class object.  (The first ivar of an instance is the the
class object.)

This kind of mapping over instance variables is done in an language
independent way by using the map_object_ivars routine in defobj/internal.m.

I don't suggest you use that, though.  The intended public interface
for casually reading and writing ivar values is VarProbe.  For
preserving object state, the intended interfaces are {Lisp,HDF5}Archiver.


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

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