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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,72137304956d9360 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-23 15:34:40 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!yellow.newsread.com!netaxs.com!newsread.com!news-out1.nntp.be!propagator2-sterling!In.nntp.be!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!194.168.4.91.MISMATCH!newspeer1-gui.server.ntli.net!ntli.net!newsfep4-glfd.server.ntli.net.POSTED!53ab2750!not-for-mail From: chris User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030903 Thunderbird/0.2 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: generic imports? void* -> generics? References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <3U3cb.2777$jJ3.43498@newsfep4-glfd.server.ntli.net> Date: Tue, 23 Sep 2003 23:39:24 +0100 NNTP-Posting-Host: 81.98.236.164 X-Complaints-To: abuse@ntlworld.com X-Trace: newsfep4-glfd.server.ntli.net 1064356479 81.98.236.164 (Tue, 23 Sep 2003 23:34:39 BST) NNTP-Posting-Date: Tue, 23 Sep 2003 23:34:39 BST Organization: ntl Cablemodem News Service Xref: archiver1.google.com comp.lang.ada:42826 Date: 2003-09-23T23:39:24+01:00 List-Id: Hi, I've been looking over the Lua Ref Manual and think I understand user data now. Full user data is a block of memory created by Lua at the clients request. The client provides the size of the block and Lua gives them an address to data of that size, or NULL. It is subject to gc but is basically a blank canvas (with no real bounds, I expect). Light user data is a pointer to something outside of Lua, like a ptr to a point or dom tree. You give Lua the pointer to the thing, it just treats it's a void ptr and that's it. It doesn't peek at what's at the address, delete it or whatever. Given that, perhaps either of Matthews suggestions is appropriate for light user data (System.Address or the fixed generic) and use a System.Address or a stream orientated approach for the Full User Data or both? It's late and I go back to Uni tomorrow, so I haven't really thought it through. Chris