comp.lang.ada
 help / color / mirror / Atom feed
From: David Holm <david@realityrift.com>
Subject: Re: C binding issue
Date: Sat, 10 May 2003 22:46:27 GMT
Date: 2003-05-10T22:46:27+00:00	[thread overview]
Message-ID: <20030511004621.63e7fbd9.david@realityrift.com> (raw)
In-Reply-To: b9jni3$mh0$1@news.onet.pl

Something like this if I'm not mistaken (been a while since I used callbacks in Ada):

type size_t_ptr is access all Interfaces.C.size_t;
type Lua_Chunkreader_Proc is access function
   (L : Lua_State_Type; Ptr : System.Address; Sz : size_t_ptr) return
   Interfaces.C.Strings.chars_ptr;


//David Holm

On Sat, 10 May 2003 22:30:40 +0200
"kat-Zygfryd" <6667@wp.pl> wrote:

> I want to write a binding for Lua 5.0
> but I encountered a problem:
> 
> in lua.h we have this definition:
> 
> typedef const char * (*lua_Chunkreader) (lua_State *L, void *ud, size_t
> *sz);
> 
> question:
> how do I define such a callback in Ada, so that I could set
> the value of *sz from within it.
> 
> Zygfryd
> 
> 



  reply	other threads:[~2003-05-10 22:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-10 20:30 C binding issue kat-Zygfryd
2003-05-10 22:46 ` David Holm [this message]
2003-05-10 23:09   ` kat-Zygfryd
2003-05-11  2:12     ` David C. Hoos
2003-05-11  2:44       ` Jeffrey Carter
2003-05-11 15:02   ` Sergey Koshcheyev
2003-05-11 16:27     ` kat-Zygfryd
2003-05-11 19:01     ` David C. Hoos
2003-05-11 22:40 ` Antonio Vargas
replies disabled

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