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