From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: Questions on using prgma Import (C, foo)
Date: Tue, 26 Feb 2008 08:50:51 -0500
Date: 2008-02-26T08:50:51-05:00 [thread overview]
Message-ID: <ulk57vnb8.fsf@stephe-leake.org> (raw)
In-Reply-To: f26aef4f-4741-44f0-aeb3-5406684075b0@c33g2000hsd.googlegroups.com
pfpearson.net@gmail.com writes:
> On Feb 25, 1:28 pm, Pascal Obry <pas...@obry.net> wrote:
>> pfpearson....@gmail.com a �crit :
>>
>> > However, it only took me a minute to realize that this won't work.
>> > I see two options:
>> > 1. function lua_tolstring (...) return System.Adddress;
>> > 2. use the types declared in Interfaces.C.Strings.
>>
>> 2 is better I think:
>>
>> function lua_tolstring
>> (L : lua_State_ptr;
>> index : inteter;
>> len : size_t_ptr) return Interfaces.C.Strings.chars_ptr;
>>
>> Pascal.
>
> That's what I suspected. Thanks.
You should also consider providing a slightly thicker wrapper that
does the conversion from Interfaces.C.Strings.chars_ptr to
Standard.String; that will make this easier to use with plain Ada
programs.
> Once I've gotten this done, is anyone interested in using this? Lua
> really is a neat embedded langauge. I hope to use it at work to
> handle reading in init data, and possibly to script some of the
> program's behavior.
Lua is used by monotone (http://monotone.ca), a distributed
configuration management system, that I'm starting to use. So I'm also
starting to use Lua.
It is a nice languaged, well designed for embedding in larger
projects.
Lua has a website: http://www.lua.org/
I'm not clear on how it manages dynamically allocated memory; that
would be a concern for some embedded systems.
I'm currently using OpenToken to build my own language for controlling
my simulator. That language has no control structures or subroutines.
I might consider switching to Lua to gain those things.
--
-- Stephe
next prev parent reply other threads:[~2008-02-26 13:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-25 19:22 Questions on using prgma Import (C, foo) pfpearson.net
2008-02-25 19:28 ` Pascal Obry
2008-02-25 19:48 ` pfpearson.net
2008-02-26 12:15 ` Jeffrey Creem
2008-02-26 13:50 ` Stephen Leake [this message]
2008-02-26 19:59 ` pfpearson.net
2008-02-26 10:51 ` Jean-Pierre Rosen
2008-02-26 20:01 ` pfpearson.net
2008-03-10 20:29 ` Alexey Veselovsky
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox