httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject Re: [APR] Universal return syntax
Date Fri, 22 Jan 1999 23:00:31 GMT

On Fri, 22 Jan 1999, Manoj Kasichainula wrote:

> 1. Consistency

char * is just as consistent. 

> 2. It would be nice to be able to report unexpected errors to the
> user, such as out-of-memory errors, and unexpected APR or system bugs.

There are no unexpected errors of strdup except for out of memory.  The
same is true of many string functions.

> It's also useful as an alternative to putting asserts in the code,
> and we all know how much we love asserts.

So instead we waste a very useful register (the return register), force
the compiler to allocate stack space, spill locals onto and off of the
stack around function calls ... all for functions that just don't fail?

I suppose I'd have to see the list of functions this is being proposed
for.  I just don't buy into the pass-by-reference mindset. 


View raw message