On Sun, 2006-05-28 at 18:55 -0700, Alex Dubov wrote:
> Yes, it was a reason why I started to play with
> apr_dbd_mysql. I'm using a lot of binary data and I
> must use 'pascal' style strings to do this (so there
> is distinction between '%s' and '%c').
I understand. However, this API is primarily a C API, so most people
will associate %s with a zero terminated string. Maybe having a %b, for
blob, would help?
> I asked Nick if we can make this "struct blob_t"
> common to apr_dbd. It's a handy little struct after
> all.
I think this would actually be the correct approach. Something like:
typedef struct apr_dbd_blob apr_dbd_blob_t;
struct apr_dbd_blob {
apr_size_t length;
char *data[];
};
Maybe there is such a structure in APR already that we're unaware of...
--
Bojan