/usr/src/redhat/BUILD/httpd-2.2.3/include/ap_config.h

Symbol export macros and hook functions [詳細]

#include "apr.h"
#include "apr_hooks.h"
#include "apr_optional_hooks.h"
#include "os.h"
#include "ap_config_auto.h"
#include "ap_config_layout.h"

ソースコードを見る。

マクロ定義

#define AP_DECLARE_STATIC
#define AP_DECLARE_EXPORT
#define AP_DECLARE(type)   type
#define AP_DECLARE_NONSTD(type)   type
#define AP_DECLARE_DATA
#define AP_MODULE_DECLARE(type)   type
#define AP_MODULE_DECLARE_NONSTD(type)   type
#define AP_MODULE_DECLARE_DATA
#define AP_DECLARE_HOOK(ret, name, args)   APR_DECLARE_EXTERNAL_HOOK(ap,AP,ret,name,args)
#define AP_IMPLEMENT_HOOK_BASE(name)   APR_IMPLEMENT_EXTERNAL_HOOK_BASE(ap,AP,name)
#define AP_IMPLEMENT_HOOK_VOID(name, args_decl, args_use)   APR_IMPLEMENT_EXTERNAL_HOOK_VOID(ap,AP,name,args_decl,args_use)
#define AP_IMPLEMENT_HOOK_RUN_ALL(ret, name, args_decl, args_use, ok, decline)
#define AP_IMPLEMENT_HOOK_RUN_FIRST(ret, name, args_decl, args_use, decline)
#define AP_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ret, name, args_decl, args_use, ok, decline)
#define AP_OPTIONAL_HOOK(name, fn, pre, succ, order)   APR_OPTIONAL_HOOK(ap,name,fn,pre,succ,order)
#define AP_HAVE_RELIABLE_PIPED_LOGS   TRUE


説明

Symbol export macros and hook functions


マクロ定義

#define AP_DECLARE ( type   )     type

Apache Core dso functions are declared with AP_DECLARE(), so they may use the most appropriate calling convention. Hook functions and other Core functions with variable arguments must use AP_DECLARE_NONSTD().

 AP_DECLARE(rettype) ap_func(args)

#define AP_DECLARE_DATA

Apache Core dso variables are declared with AP_MODULE_DECLARE_DATA. This assures the appropriate indirection is invoked at compile time.

覚え書き:
AP_DECLARE_DATA extern type apr_variable; syntax is required for declarations within headers to properly import the variable.
 AP_DECLARE_DATA type apr_variable

#define AP_DECLARE_EXPORT

AP_DECLARE_EXPORT is defined when building the Apache Core dynamic library, so that all public symbols are exported.

参照:
AP_DECLARE_STATIC

#define AP_DECLARE_HOOK ( ret,
name,
args   )     APR_DECLARE_EXTERNAL_HOOK(ap,AP,ret,name,args)

Declare a hook function

引数:
ret The return type of the hook
name The hook's name (as a literal)
args The arguments the hook function takes, in brackets.

#define AP_DECLARE_NONSTD ( type   )     type

Apache Core dso variable argument and hook functions are declared with AP_DECLARE_NONSTD(), as they must use the C language calling convention.

参照:
AP_DECLARE
 AP_DECLARE_NONSTD(rettype) ap_func(args [...])

#define AP_DECLARE_STATIC

AP_DECLARE_STATIC is defined when including Apache's Core headers, to provide static linkage when the dynamic library may be unavailable.

参照:
AP_DECLARE_EXPORT
AP_DECLARE_STATIC and AP_DECLARE_EXPORT are left undefined when including Apache's Core headers, to import and link the symbols from the dynamic Apache Core library and assure appropriate indirection and calling conventions at compile time.

#define AP_IMPLEMENT_HOOK_RUN_ALL ( ret,
name,
args_decl,
args_use,
ok,
decline   ) 

値:

APR_IMPLEMENT_EXTERNAL_HOOK_RUN_ALL(ap,AP,ret,name,args_decl, \
                                            args_use,ok,decline)
Implement an Apache core hook that runs until one of the functions returns something other than ok or decline. That return value is then returned from the hook runner. If the hooks run to completion, then ok is returned. Note that if no hook runs it would probably be more correct to return decline, but this currently does not do so. The implementation is called ap_run_name.

引数:
ret The return type of the hook (and the hook runner)
name The name of the hook
args_decl The declaration of the arguments for the hook, for example "(int x,void *y)"
args_use The arguments for the hook as used in a call, for example "(x,y)"
ok The "ok" return value
decline The "decline" return value
戻り値:
ok, decline or an error.
覚え書き:
If IMPLEMENTing a hook that is not linked into the Apache core, (e.g. within a dso) see APR_IMPLEMENT_EXTERNAL_HOOK_RUN_ALL.

#define AP_IMPLEMENT_HOOK_RUN_FIRST ( ret,
name,
args_decl,
args_use,
decline   ) 

値:

APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(ap,AP,ret,name,args_decl, \
                                              args_use,decline)
Implement a hook that runs until a function returns something other than decline. If all functions return decline, the hook runner returns decline. The implementation is called ap_run_name.

引数:
ret The return type of the hook (and the hook runner)
name The name of the hook
args_decl The declaration of the arguments for the hook, for example "(int x,void *y)"
args_use The arguments for the hook as used in a call, for example "(x,y)"
decline The "decline" return value
戻り値:
decline or an error.
覚え書き:
If IMPLEMENTing a hook that is not linked into the Apache core (e.g. within a dso) see APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST.

#define AP_IMPLEMENT_HOOK_VOID ( name,
args_decl,
args_use   )     APR_IMPLEMENT_EXTERNAL_HOOK_VOID(ap,AP,name,args_decl,args_use)

Implement an Apache core hook that has no return code, and therefore runs all of the registered functions. The implementation is called ap_run_name.

引数:
name The name of the hook
args_decl The declaration of the arguments for the hook, for example "(int x,void *y)"
args_use The arguments for the hook as used in a call, for example "(x,y)"
覚え書き:
If IMPLEMENTing a hook that is not linked into the Apache core, (e.g. within a dso) see APR_IMPLEMENT_EXTERNAL_HOOK_VOID.

#define AP_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL ( ret,
name,
args_decl,
args_use,
ok,
decline   ) 

値:

APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ap,AP,ret,name,args_decl, \
                                            args_use,ok,decline)
Implement an optional hook. This is exactly the same as a standard hook implementation, except the hook is optional.
参照:
AP_IMPLEMENT_HOOK_RUN_ALL

#define AP_MODULE_DECLARE ( type   )     type

Declare a dso module's exported module structure as AP_MODULE_DECLARE_DATA.

Unless AP_MODULE_DECLARE_STATIC is defined at compile time, symbols declared with AP_MODULE_DECLARE_DATA are always exported.

 module AP_MODULE_DECLARE_DATA mod_tag

#define AP_OPTIONAL_HOOK ( name,
fn,
pre,
succ,
order   )     APR_OPTIONAL_HOOK(ap,name,fn,pre,succ,order)

Hook an optional hook. Unlike static hooks, this uses a macro instead of a function.


Apacheに対してSun Jul 19 22:05:24 2009に生成されました。  doxygen 1.4.7