[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: A new idea/module for generate binding code.
- From: Xavier Wang <weasley.wx@...>
- Date: Fri, 11 Nov 2011 09:37:11 +0800
2011/11/11 Robert G. Jakabosky <firstname.lastname@example.org>:
> On Wednesday 09, Xavier Wang wrote:
>> local B = require 'bindings'
>> local type, module, class, func =
>> B.type, B.module, B.class, B.func
>> local voidptr, int, char = B.voidptr, B.int, B.char
> Why not have a generator script that loads the definition file, instead of
> having the definition files load the generator as a module. The generator can
> setup a special environment for the definition file so you don't have to
> include the above boilerplate code in each definition file.
this code is generated by generator. so you needn't write them by hand :-)
>> I'm try to add some mechanism to generate OO style interface over pure
>> C library (like cairo), Are there any idea about it? I will begin this
>> plan, and after I have some result, I will create a project on github,
>> and reply this mail.
> I have created a bindings generator  for C libraries. It is designed to
> generate OO style interfaces for C functions. It also supports generating
> wrapper C functions so Lua functions can be used as C callbacks.
> Right now it doesn't support generating bindings for C++ code, but support
> could be added.
> 1. https://github.com/Neopallium/LuaNativeObjects
That's great, I will look into it soon, Thank you :-)