> AB> Is there a 64-bit integer zval, or is it expected in the near future ? > AB> (Need it for BLOB handling in Interbase) > > Only on 64bit machines there is.
You mean because long == int64 on 64-bit architectures, right ? > But you can use mumeric strings for that as ext/pgsql does. Not really, in my case. Right now, if you create a BLOB, the C-struct describing it internally is cast to a zval_string and returned to user-space. I think this is bad. Apart from the fact that you get memory adresses and stuff in the script context, it also means that the value returned has no meaning whatsoever to Interbase itself. Furthermore, if you try to insert a BLOB-value directly that has exactly the sizeof(C-struct), it will be cast as such, and a bogus BLOB handle will be inserted into the database. I would like to improve this by returning the Interbase-assigned BLOB handle directly. The stuff from the struct would have to be stored in a map<handle,C-struct>, probably implemented by using a hash. The size of a BLOB-handle is 64-bits. (Although currently implemented as a struct containing two int32's in Interbase) However, currently Interbase supports inserting strings into BLOB fields directly (which is very useful, BTW, apart from the abovementioned pitfal). If I use strings to represent BLOB handles as well as BLOBs themselves, I would have to distinguish between a BLOB handle and the BLOB itself by looking at the string. If the handle would be a real int64, that wouldn't be a problem. Ard -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php