Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: How big is a (??? *) Message-ID: <6689@mimsy.UUCP> Date: Fri, 15-May-87 01:03:53 EDT Article-I.D.: mimsy.6689 Posted: Fri May 15 01:03:53 1987 Date-Received: Sat, 16-May-87 13:50:10 EDT References: <737@edge.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 28 In article <737@edge.UUCP> doug@edge.UUCP (Doug Pardee) writes: >Just that one source module knows the description of that struct. To >the "outside world", each object is known only by a handle, which is >typically (here it comes, folks) a pointer to that malloc'ed struct. ... >Unfortunately, as we've seen, that means that the outside world doesn't >even know how big the pointer is. This is the sort of problem the (void *) type in the dpANS is intended to solve. For now, I have been using (char *), or in some situations, (caddr_t), which is really just an alias for (char *) after all. If you want to be maximally paranoid, use a header file: #ifdef dpANS_conformant_compiler_flag typedef void *handle; #else typedef char *handle; #endif and mark this file `system dependent'. (Incidentally, a `handle' usually refers to a pointer to a pointer, the double indirection allowing space compaction of large objects, or even allowing the faking of virtual memory on certain hardware configurations.) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690) Domain: chris@mimsy.umd.edu Path: seismo!mimsy!chris