From: Claudio V. C. <cv...@us...> - 2003-10-27 09:01:58
|
Hi, our ibase.h declares these two functions: BSTREAM* ISC_EXPORT Bopen(ISC_QUAD*, isc_db_handle, isc_tr_handle, const char*); BSTREAM* ISC_EXPORT Bopen2(ISC_QUAD*, isc_db_handle, isc_tr_handle, const char*, unsigned short); I have three issues with them: 1.- Bopen is "open" in the generic way: it opens or creates a blob and wraps it in a bstream structure. This means "blob-stream". It calls BLOB_open to do the wrapping job, but the second function has the wrong name, it could be called wrap_blob, generate_bstream_from_blob, etc., but it doesn't open anything. It has to be passed an already opened/created blob. It's exposed, too through ibase.h, directly to the app developer. They are defined in utl.cpp inside jrd. 2.- The functional header, utl_proto.h, has most of those functions with uppercase names commented, so I'm not sure if the declaration in ibase.h will suffice to use them... assuming they are used... using memory returned by the engine (even if it comes from the client library) is not my favorite game. 3.- The second function shown above, Bopen2, is not found anywhere. At first glance and following the name conventions in the engine, the "2" indicates an extended version of the original function, but it's not declared in other places and more incredible, it's not defined in any file I have. Maybe the poor function died with some cleanup in fb1? I don't see much value in offering undefined functions through the API. BTW, the only place where I can find bstream defined, coupled with some ugly macros, is ibase.h... at first glance, it's strange, since the engine uses its internal definitions, so this should be a client-only thing. C. -- Claudio Valderrama C. Consultant, SW developer. www.cvalde.com - www.firebirdSql.org |