newLISP Fan Club

Forum => Anything else we might add? => Topic started by: ryuo on July 03, 2014, 09:48:11 PM

Title: Missing unsigned types for FFI interface?
Post by: ryuo on July 03, 2014, 09:48:11 PM
Is there a particular reason why unsigned long and unsigned long long are missing from the FFI code? I see that unsigned types exist for everything else, but not for these. Specifically, I am referring to their absence from the ffi_types array. I would have expected these to exist. Their absence makes me wonder if there's any way to pass unsigned 64 bit types to the import function so you can specify a return type or parameter type as an unsigned 64 bit type. Thank you.
Title: Re: Missing unsigned types for FFI interface?
Post by: Lutz on July 05, 2014, 07:13:39 AM
The biggest size newLISP can hold in one lisp cell w/o allocating memory is 64-bit on both 32-bit and 64-bit versions for a range between -9223372036854775808 and 9223372036854775807 using the 64th bit as a sign bit. The unsigned 64-bit type is not supported by newLISP.