diff options
author | Johannes Schmid <jhs@gnome.org> | 2006-09-19 20:07:31 +0000 |
---|---|---|
committer | Murray Cumming <murrayc@src.gnome.org> | 2006-09-19 20:07:31 +0000 |
commit | 502ccd9a6bbc8e8acadf055fc27e059f6fadc6da (patch) | |
tree | f38509c480d7c4ff403f5857c06bba23455482d5 /tools/m4/method.m4 | |
parent | 1e3e8b84df97d6ef0e1a42c0f348148d8958f36d (diff) | |
download | glibmm-502ccd9a6bbc8e8acadf055fc27e059f6fadc6da.tar.gz |
Change _IMPLEMENTS_INTERFACE to _IMPLEMENTS_INTERFACE_CC so we can have
2006-09-14 Johannes Schmid <jhs@gnome.org>
* tools/m4/class_shared.m4: Change _IMPLEMENTS_INTERFACE to
_IMPLEMENTS_INTERFACE_CC so we can have more control over it,
by generating the _IMPLEMENTS_INTERFACE_CC from the WrapParser.pm.
* tools/m4/method.m4:
* tools/m4/signal.m4:
* tools/m4/vfunc.m4: Added optional parameters that result in
#ifdefs around methods, signals, vfuncs, etc.
* tools/pm/Output.pm: Addef ifdef() and endif().
output_wrap_vfunc_h(), output_wrap_vfunc_cc(),
output_wrap_default_signal_handler_h(),
output_wrap_default_signal_handler_cc(),
output_wrap_meth(),
output_wrap_create(),
output_wrap_sig_decl(): Support optional ifdefs around
declarations and implementations, by calling ifdef() and endif(),
or by passing the extra argument to the m4 macros.
* tools/pm/WrapParser.pm: parse_and_build_output():
Parse _IMPLEMENTS_INTERFACE, and call the new on_implements_interface()
method, which uses the new output_implements_interface() method,
so it can have an optional ifdef parameter.
on_wrap_method(), on_wrap_create(), on_wrap_vfunc(), output_wrap_signal(),
output_wrap_vfunc(): Handle the optional ifdef (with a parameter) option
for the _WRAP*() macros.
This adds support for disabling certain features by using the new
ifdef argument for methods, vfuncs, signals and interfaces.
Diffstat (limited to 'tools/m4/method.m4')
-rw-r--r-- | tools/m4/method.m4 | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/tools/m4/method.m4 b/tools/m4/method.m4 index 1c99b93d..e5ed7282 100644 --- a/tools/m4/method.m4 +++ b/tools/m4/method.m4 @@ -9,12 +9,14 @@ dnl dnl dnl method -dnl $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 -dnl _METHOD(cppname,cname,cpprettype,crettype,arglist,cargs,const,refreturn,errthrow,deprecated,constversion,arglist_without_types) +dnl $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 +dnl _METHOD(cppname,cname,cpprettype,crettype,arglist,cargs,const,refreturn,errthrow,deprecated,constversion,ifdef, arglist_without_types) define(`_METHOD',`dnl _PUSH(SECTION_CC) ifelse(`$10',,,`_DEPRECATE_IFDEF_START ')dnl +ifelse(`$13',,,`#ifdef $13' +)dnl ifelse(`$9',,,`#ifdef GLIBMM_EXCEPTIONS_ENABLED' )dnl $3 __CPPNAME__::$1`'($5)ifelse(`$7',1,` const') @@ -48,18 +50,24 @@ ifelse(`$3',void,,` return retvalue;') ')dnl End errthrow/refreturn ',` return const_cast<__CPPNAME__*>(this)->$1($12);') } + +ifelse(`$13',,,` +#endif // $13 +')dnl ifelse(`$10',,,`_DEPRECATE_IFDEF_END -') +')dnl _POP()') dnl dnl static method -dnl $1 $2 $3 $4 $5 $6 $7 $8 $9 -dnl _STATIC_METHOD(cppname,cname,cpprettype,crettype,arglist,cargs,refreturn,errthrow,deprecated)) +dnl $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 +dnl _STATIC_METHOD(cppname,cname,cpprettype,crettype,arglist,cargs,refreturn,errthrow,deprecated,ifdef)) define(`_STATIC_METHOD',`dnl _PUSH(SECTION_CC) ifelse(`$9',,,`_DEPRECATE_IFDEF_START ')dnl +ifelse(`$10',,,`#ifdef $10' +)dnl ifelse(`$8',,,`#ifdef GLIBMM_EXCEPTIONS_ENABLED ')dnl $3 __CPPNAME__::$1($5) @@ -89,6 +97,10 @@ ifelse(`$7',,,`dnl ifelse(`$3',void,,` return retvalue;') ')dnl } + +ifelse(`$10',,,` +#endif // $10 +')dnl ifelse(`$9',,,`_DEPRECATE_IFDEF_END ') _POP()') |