From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5997b4b7b514f689 X-Google-Attributes: gid103376,public From: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson) Subject: Re: Reading a line of arbitrary length Date: 1997/03/11 Message-ID: <5g2mgp$2kq@mulga.cs.mu.OZ.AU>#1/1 X-Deja-AN: 224576108 References: <5fh7hp$l3c@mulga.cs.mu.OZ.AU> <5fijee$51j$1@goanna.cs.rmit.edu.au> <5flmbc$nkm@mulga.cs.mu.OZ.AU> Organization: Comp Sci, University of Melbourne Newsgroups: comp.lang.ada Date: 1997-03-11T00:00:00+00:00 List-Id: dewar@merv.cs.nyu.edu (Robert Dewar) writes: >Fergus says > ><interface? Can one pass a pointer to a dynamically allocated SNOBOL4 >data structure to the C code? What happens if the last pointer to such >a data structure exists only in a C global variable? >>> > >Given that typical SNOBOL4 compilers have compacting collectors, they >are WAY out of range of this kind of consideration. A conservative >collector cannot conservatively modify things that it is not sure are >pointers! So the answer is that C can reference structures, but cannot >hold onto pointers AT ALL, let alone be the only one to hold on to them! OK, so I guess you have to use some sort of handles instead of pointers. Hmmm, it's not sounding quite so transparent anymore... But my question still stands: what happens if the last reference (handle, pointer, whatever) to a dynamically allocated SNOBOL4 data structure is stored in a C global variable? -- Fergus Henderson | "I have always known that the pursuit WWW: | of excellence is a lethal habit" PGP: finger fjh@128.250.37.3 | -- the last words of T. S. Garp.