[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: FFI metamethods on C struct pointer
- From: Mike Pall <mikelu-1106@...>
- Date: Sat, 11 Jun 2011 18:48:35 +0200
Javier Guerra Giraldez wrote:
> it never calls my __tostring() metamethod. it seems that it's because
> the cdata contains a FILE*, and not a FILE.
It works now. Please see my other message.
> but i can't do:
>
> ffi.metatype ('FILE *')
>
> nor:
>
> local file_tp = ffi.typeof ('FILE *')
> ffi.metatype (file_tp, {.....})
Nor should this work. Metatypes are always bound to the underlying
aggregate and not to any pointer type.
--Mike