Re: metatype __gc inconsistency

  • From: Tomash Brechko <tomash.brechko@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 19 Sep 2014 19:18:50 +0400

2014-09-19 18:13 GMT+04:00 Coda Highland <chighland@xxxxxxxxx>:

> There are pointers to values, and there are values.


Yup, but that part of discussion is agreed upon and closed.  Look carefully
into the second example - no pointers there (don't let "malloc()" mislead
you, in its place you may use

  ffi.cdef[[ struct S { double d; }; struct S sin(double a); ]]
  ...
  s2 = ffi.C.sin(0) -- not a pointer either

just as well - any function returning a struct will do).



-- 
  Tomash Brechko

Other related posts: