__metatable for cdata

  • From: Ronan Collobert <ronan@xxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 27 Mar 2014 19:44:52 +0100

Dear Mike,

 I looked around in the mailing list, and I saw someone already asked the 
question, which has been kept unanswered (to my knowledge, sorry if I am wrong) 
.

"Would it be easy to allow setting custom placeholder values of this
kind returned by getmetatable(cdata), i.e. implement __metatable for
custom cdata types?”

I am in fact interested in this too. I understand you want to protect FFI 
metatables and I understand that one should not be able to retrieve the actual 
metatable of a cdata with getmetatable(). But is the idea of customizing 
__metatable really wrong (or not possible technically speaking) in your opinion?

Thanks
Ronan

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Other related posts:

  • » __metatable for cdata - Ronan Collobert