apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: apr_table_do
Date Fri, 28 Jun 2002 18:06:21 GMT
At 12:36 PM 6/28/2002, Ben Laurie wrote:

>We really ought to have a better name than NONSTD(), coz I can't remember 
>precisely what it means, and I invented it! However, ISTR its required if 
>you have ... in the args?

"The APR Project: We can't name APIs to save our lives"  :-)

It simply means that the caller must pop the args from the stack.  That makes
it incompatible (on win32 and possibly elsewhere) with other languages 
that specific function.

Where we have the choice, we have chosen to let the callee pop the args, which
means it must know about the arguments passed.  So you are right, ... always
defeats that convention :)

Letting the callee pop the args means the APR library remains as compatible
as possible for integration into other languages, such as fortran, basic 
and pascal
(callee popping the stack is sometimes called the pascal convention on win32.)

For Windows this gives us another win.  If someone adds another arg without
recompiling the apps, the original symbol (say, _apr_foo@12) isn't found, since
the new function has a redecorated name (_apr_foo@16).  This prevents us from
ever confusing binaries and libs that would cause the software to 
fault.  Instead,
the binary just won't load.


View raw message