[oolua] Re: C++/OOLUA Memory management

  • From: "liamdevine" <liamdevine@xxxxxxxxx>
  • To: oolua@xxxxxxxxxxxxx
  • Date: Wed, 16 Oct 2013 14:02:37 +0100

On 15 Oct 2013, at 16:42, apscience wrote:

> Ok, this is exactly what I was looking for. I looked up traits in the 
> documentation and found lua_acquire_ptr which worked. [1] However the example 
> you linked does not seem to work. It seems those traits don’t exist for my 
> version of OOLUA? As far as I know I’m using 2.0.0-Beta1 and I’ve been 
> following the documentation labeled as such.
>  
> Is there separate documentation about these other traits? Or are they new 
> enough that documentation is still pending?
>  
> [1] 
> http://oolua.googlecode.com/svn/docs/branches/dsl/html/group___o_o_lua_traits.html
>  
> Thanks again!
>  

Lesson learnt:
When you ask someone to look at the documentation, don't be surprised when the 
look at the documentation :)

Yes you are quiet correct, those traits were added after Beta. There is not 
currently a set of generated docs which detail them, besides inline docs in the 
repository. 
Hopefully Beta 2 will be released soon, probably later tonight. Although I have 
some bad news for you, lua_acquire_ptr is no longer permitted, along with 
cpp_acquire_ptr, as a trait for a function. I was never happy with them having 
dual roles and version 2 seems a good a time to sort that out.
Traits are now split into three categories Parameter Traits, Function Return 
Traits and Stack Traits. lua_acquire_ptr and cpp_acquire_ptr are now Stack 
Traits i.e they work with OOLUA::push and OOLUA::pull respectively.

I know the namespace is called OOLUA, that is the convention I use for 
namespaces, but honestly the name of the library is OOLua as in Object Oriented 
Lua[1].


[1] http://www.lua.org/about.html#name

--Liam

Other related posts: