lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It’s internals?

 

I just basically use it for what it provides: a way to share classes, functions, and data between C and Lua.

 

For what reason do you need to know it’s internals?

 

-e-

 


From: lua-bounces@bazar2.conectiva.com.br [mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Anthony J Webster
Sent: November 30, 2004 3:01 AM
To: 'Lua list'
Subject: RE: ToLua Questions? (Two Features I'm Curious About?)

 

Hi,

I too am interested in toLua. Do you know anything about it’s internals?

Thanks

Anthony

 


From: lua-bounces@bazar2.conectiva.com.br [mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Eddie Parker
Sent: 29 November 2004 23:55
To: lua@bazar2.conectiva.com.br
Subject: ToLua Questions? (Two Features I'm Curious About?)

 

Hello!

 

I’m uncertain if this is the list to ‘bother’ about toLua, but I couldn’t find one on the toLua site.. So I’m just going to try here. Sorry if I offend by doing so! J

 

I *love* toLua. While the documentation was a little bit antiquated, it worked pretty darned well. (Well, except when I had a class method that returned a const char * const… toLua didn’t like that. J)

 

Anyhow, two things I’d be interested to know if anybody knows a way of doing:

 

a)       Adding #line directives to the generated cpp file, a’la bison.

b)        Any way to markup an *existing* .h file to be a ‘cleaned’ header file?

 

I’m curious about a), because it’ll make things a little easier – for instance, I once had my .pkg file use a global constant, that I had removed.

 

As for b), I’d just like to see this as a solution to the synchronization of the C++ .h file and the ‘cleaned’ header file. I was thinking of something like the following:

 

1)       Assume the tolua.exe understands the following as a ‘begin comment section’:      // <NO_TO_LUA>

2)       Assume the tolua.exe understands the following as an ‘end comment section’:       // </END_ NO_TO_LUA >

 

Now, picture a header that gets compiled by C++ *and* tolua.exe, that looks like this:

 

// <NO_TO_LUA>

#ifndef MY_CLASS_H

#define MY_CLASS_H

// </END_ NO_TO_LUA >

 

class MyClass

{

// <NO_TO_LUA>

public:

// </END_ NO_TO_LUA >

 

            MyClass();

            ~MyClass();

 

            unsigned int Get() const;

            void Set(unsigned int setValue);

 

// <BEGIN_TO_LUA_COMMENT>

private:

            unsigned int x;

// </END_ NO_TO_LUA >

};

 

 

Or something near this. Anybody have any thoughts?

 

Anyhow – thank you for your time, I apologize if this *is* in fact the wrong list.

 

Cheers! J

 

-e-


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.788 / Virus Database: 533 - Release Date: 01/11/2004


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.788 / Virus Database: 533 - Release Date: 01/11/2004


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.788 / Virus Database: 533 - Release Date: 01/11/2004