X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-Virus-Scanned: Debian amavisd-new at papyrus.altaweb.hu Date: Sat, 7 Feb 2015 02:16:05 +0100 From: Lev To: geda-user AT delorie DOT com Subject: Re: [geda-user] Using Lua to safely read configuration and layout files (program attached) Message-ID: <20150207021605.4eb63302@jive> In-Reply-To: References: <20150206204743 DOT 6a72346d AT jive> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id t171GCnf019020 Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Fri, 6 Feb 2015 17:28:42 -0500 Jason White wrote: > I have to say I don't completely understand your question. The stack > is nothing more than an exchange medium between the Lua script and the > C program. If a script defines a variable, the C program requests it > and it gets pushed onto the top of the stack. When the C program wants > to read its value, it pops it off the stack. I know. However, I think Lua's stack is designed to push/pop argument and return values of functions. What we want to do, is put the whole layout on the stack. Arguments and return values are few byte of data. The whole layout can be 10 megabytes. Levente