apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@rexursive.com>
Subject Re: [PATCH]: improved error reporting for apr_dbd_mysql.c - correct version
Date Mon, 29 May 2006 02:25:19 GMT
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...


View raw message