comp.lang.ada
 help / color / mirror / Atom feed
From: chris <spamoff.danx@ntlworld.com>
Subject: Re: generic imports?  void* -> generics?
Date: Fri, 19 Sep 2003 21:46:28 +0100
Date: 2003-09-19T21:46:28+01:00	[thread overview]
Message-ID: <rSJab.3711$I9.1311@newsfep4-winn.server.ntli.net> (raw)
In-Reply-To: <FBIab.3309$DM5.35123@newsfep4-glfd.server.ntli.net>

Another problem is that in this case the void* is a pointer to some data 
block... but if we define the following


with Lua_Types;                use Lua_Types;

generic
    type Userdata is private;
    type Userdata_Access is access all Userdata;

function Lua.To_Userdata (L   : in Lua_State_Access;
                           Pos : in Index) return Userdata_Access;

what will the interaction be with the c code?  It's not possible afaik 
to define the convention of Userdata_Access to C.

Can anyone please help?  I'm not really sure what the solution should be...

http://www.lua.org/manual/5.0/manual.html#3.8 describes the operation of 
this function ...


"lua_touserdata (see 3.5) retrieves the value of a userdata. When 
applied on a full userdata, it returns the address of its block; when 
applied on a light userdata, it returns its pointer; when applied on a 
non-userdata value, it returns NULL."




  reply	other threads:[~2003-09-19 20:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-19 19:20 generic imports? void* -> generics? chris
2003-09-19 20:46 ` chris [this message]
2003-09-19 21:18 ` Nick Roberts
2003-09-19 23:12   ` chris
2003-09-20 16:52   ` Simon Wright
2003-09-22 21:30     ` Randy Brukardt
2003-09-23  5:45       ` Simon Wright
2003-09-23 19:07         ` Randy Brukardt
2003-09-23 20:28           ` Simon Wright
2003-09-24 18:16             ` Randy Brukardt
2003-09-19 22:40 ` Matthew Heaney
2003-09-19 23:01   ` chris
2003-09-20  1:59   ` Jeffrey Carter
2003-09-20 13:52     ` Matthew Heaney
2003-09-23 22:39 ` chris
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox