Reading luaL_newlib documentation and lua52.pas implementation of it (it's a macro in the original C code), I see that you need a sentinel value to mark the end of the array by putting nil in the name part. I was already skeptic since the API doesn't mention the number of elements in the array as commonly required by a C function.
-- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-SEGFAULT-difference-between-pointer-and-dynarray-tp4028296p4028310.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus