diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2001-06-06 17:19:03 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2001-06-06 17:19:03 +0000 |
commit | b1d00253b172a30216646eb78e7946d82b95668f (patch) | |
tree | d9c8a8cd11438f987ec096d9f88eb91032f63a85 /include/apr_general.h | |
parent | 1a72bb8b6f7fbab89f814eae1df6416c7ad23011 (diff) | |
download | libapr-b1d00253b172a30216646eb78e7946d82b95668f.tar.gz |
Solve the linkage issue with a native-C (nonstd convention) declaration
of apr_terminate (for atexit(apr_terminate), etc), and provide an
alternate apr_terminate2 only for non-C languages ('pascal' convention.)
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61715 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_general.h')
-rw-r--r-- | include/apr_general.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/include/apr_general.h b/include/apr_general.h index 81debdf04..150aa513d 100644 --- a/include/apr_general.h +++ b/include/apr_general.h @@ -173,10 +173,24 @@ APR_DECLARE(apr_status_t) apr_initialize(void); * automatically. * @tip An APR program must call this function at termination once it * has stopped using APR services. The APR developers suggest using - * atexit to ensure this is called. + * atexit to ensure this is called. When using APR from a language + * other than C that has problems with the calling convention, use + * apr_terminate2() instead. * @deffunc void apr_terminate(void) */ -APR_DECLARE(void) apr_terminate(void); +APR_DECLARE_NONSTD(void) apr_terminate(void); + +/** + * Tear down any APR internal data structures which aren't torn down + * automatically, same as apr_terminate + * @tip An APR program must call either the apr_terminate or apr_terminate2 + * function once it it has finished using APR services. The APR + * developers suggest using atexit(apr_terminate) to ensure this is done. + * apr_terminate2 exists to allow non-c language apps to tear down apr, + * while apr_terminate is recommended from c language applications. + * @deffunc void apr_terminate2(void) + */ +APR_DECLARE(void) apr_terminate2(void); #ifdef __cplusplus } |