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,ca21162c929cc36f X-Google-Attributes: gid103376,public From: jmatthews@nova.wright.edu (Dr. John B. Matthews) Subject: Re: Implementing pointers to pointers in Ada Date: 1996/09/12 Message-ID: <1996Sep12.144206@nova.wright.edu>#1/1 X-Deja-AN: 180204939 references: <511sp9$ogs@newsbf02.news.aol.com> <3235E2C3.636F@itg-sepg.logicon.com> organization: Wright State University newsgroups: comp.lang.ada Date: 1996-09-12T00:00:00+00:00 List-Id: In article <3235E2C3.636F@itg-sepg.logicon.com>, David Shochat writes: > John Herro wrote: >> Of course, it's not obvious WHY you want to use two levels of indirection. > It was necessary for 68K Mac programming (I don't know about PPC). The > OS had to be able to move heap objects around whenever memory got tight, > so the programmer would access most GUI objects through a so-called > "handle" which was a pointer to a "master" pointer to the actual data. MacOS on PPC uses the same interface for memory management as 68K, although the implementation has changed considerably:-) I recently had the pleasure of working on MacOS bindings for GNAT on MacOS with MachTen. The bindings rely extensively on declarations such as type ObjectRec is record ... end record; type ObjectPtr is access ObjectRec; type ObjectHdl is access ObjectPtr; The ObjectHdl.all.all syntax looks strange at first, but MacOS programmers at a recent trade show seemed to have no trouble following the sample code we showed them. John ---------------------------------------------------------------- Dr. John B. Matthews jmatthews@nova.wright.edu; john_matthews@ccmail.dayton.saic.com "Whom the gods would destroy, they first invite to program in C"