[gtkmm/use-dllexport: 7/12] class_gtkobject.m4: Add ability to decorate generated classes
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm/use-dllexport: 7/12] class_gtkobject.m4: Add ability to decorate generated classes
- Date: Mon, 8 Jun 2020 04:20:39 +0000 (UTC)
commit 8358d3997c749d6435be9ba6134c74be346aa1fe
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Jun 5 16:27:10 2020 +0800
class_gtkobject.m4: Add ability to decorate generated classes
Add an optional `__FUNC_DECORATION__` (eighth) parameter to _CLASS_GTKOBJECT so
that we can use it to decorate the classes, functions and methods with
__FUNC_DECORATION__ if it is needed, so that we can use that to export the
symbols without using additional tools if the compiler does not support
automatic all-symbol exporting or export by regex, or when we want to have a
more fine-grained approach to how we want to export the symbols, as in the
case of Visual Studio builds.
tools/m4/class_gtkobject.m4 | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/tools/m4/class_gtkobject.m4 b/tools/m4/class_gtkobject.m4
index 1cf15669..dd3ce146 100644
--- a/tools/m4/class_gtkobject.m4
+++ b/tools/m4/class_gtkobject.m4
@@ -17,6 +17,7 @@ dnl rather than the real instance type. That is really ugly, yes. We get aroun
dnl the problem by supporting optional __REAL_* arguments to this macro.
define(`__REAL_CNAME__',ifelse(`$6',,__CNAME__,`$6'))
define(`__REAL_CPARENT__',ifelse(`$7',,__CPARENT__,`$7'))
+define(`__FUNC_DECORATION__',`$8')
dnl
@@ -111,7 +112,7 @@ dnl _STRUCT_PROTOTYPE() can be disabled with _STRUCT_NOT_HIDDEN.
_STRUCT_PROTOTYPE()
#ifndef DOXYGEN_SHOULD_SKIP_THIS
-__NAMESPACE_BEGIN__ class __CPPNAME__`'_Class; __NAMESPACE_END__
+__NAMESPACE_BEGIN__ class __FUNC_DECORATION__ __CPPNAME__`'_Class; __NAMESPACE_END__
#endif //DOXYGEN_SHOULD_SKIP_THIS
_SECTION(SECTION_HEADER3)
@@ -128,6 +129,7 @@ namespace Glib
*
* @relates __NAMESPACE__::__CPPNAME__
*/
+ __FUNC_DECORATION__
__NAMESPACE__::__CPPNAME__`'* wrap(__CNAME__`'* object, bool take_copy = false);
} //namespace Glib
')dnl endif __BOOL_NO_WRAP_FUNCTION__
@@ -262,7 +264,7 @@ m4_ifdef(`__BOOL_PROTECTED_GCLASS__',
`protected:',`dnl else
private:')dnl endif
- friend class __CPPNAME__`'_Class;
+ friend __FUNC_DECORATION__ class __CPPNAME__`'_Class;
static CppClassType `'__BASE__`'_class_;
protected:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]