httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@lnd.com>
Subject RE: cvs commit: apache-2.0/src/include http_core.h
Date Wed, 28 Jun 2000 11:22:55 GMT
> From: Greg Stein [mailto:gstein@lyra.org]
> Sent: Wednesday, June 28, 2000 6:20 AM
> 
> Call me dense, but I don't see what you mean.
> 
> I see API_EXPORT stuff applied to the hook API functions. But the typedef
> (HOOK_##name) has no calling convention information. Since it doesn't, I
> would presume the the calling convention to be "standard". Therefore, we
> should be able to pass an API_EXPORT function into things like
> ap_hook_translate_name().
 
No, you see correctly.  But API_EXPORT is __stdcall, a.k.a. the Pascal
calling convention (callee pops the args), and API_EXPORT_NONSTD is __cdecl,
(the caller pops the args after return.)  The default is __cdecl for C
compilation, by the compiler switches.

We could have just jumped on __stdcall, meaning -every- language could pass
a function to the register hook function, but that would hose up any and
all variable args as parameters to hooks.  As it stands, they all need to
be __cdecl, and API_EXPORT() would tell the compiler otherwise.
 
> On Wed, Jun 28, 2000 at 05:41:34AM -0500, William A. Rowe, Jr. wrote:
> > Greg... diff 1.18 to 1.20 of ap_hooks.h, I think you will see in
> > code why this isn't a simple question.


Mime
View raw message