aboutsummaryrefslogtreecommitdiffstats
path: root/libparc/parc/algol/parc_Object.h
diff options
context:
space:
mode:
authorAngelo Mantellini <manangel@cisco.com>2019-02-05 08:50:26 +0100
committerAngelo Mantellini <manangel@cisco.com>2019-02-06 16:23:04 +0100
commit9f68541e0f55495d61dd9e583bec38740a247597 (patch)
tree55519e34159ac1eb691e080e4c1eab5b0e4847bd /libparc/parc/algol/parc_Object.h
parentb77148ddc3def71e6c412c3afb5f1c20be2d77cd (diff)
[HICN-26] Windows compatibilty for libparc
Change-Id: I6ebff82a81a2bf42fa3bf210ff0e6e530ce21915 Signed-off-by: Angelo Mantellini <manangel@cisco.com>
Diffstat (limited to 'libparc/parc/algol/parc_Object.h')
-rw-r--r--libparc/parc/algol/parc_Object.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/libparc/parc/algol/parc_Object.h b/libparc/parc/algol/parc_Object.h
index ac7e9652..ba9392a4 100644
--- a/libparc/parc/algol/parc_Object.h
+++ b/libparc/parc/algol/parc_Object.h
@@ -623,7 +623,7 @@ const PARCObjectDescriptor *parcObject_SetDescriptor(PARCObject *object, const P
}; \
_Pragma("GCC diagnostic pop") \
const PARCObjectDescriptor parcObject_DescriptorName(_subtype)
-#else
+#elif defined(__GNUC__)
#define parcObject_Extends(_subtype, _superType, ...) \
_Pragma("GCC diagnostic ignored \"-Woverride-init\"") \
parcObjectDescriptor_Declaration(_subtype) = { \
@@ -647,7 +647,29 @@ const PARCObjectDescriptor *parcObject_SetDescriptor(PARCObject *object, const P
}; \
_Pragma("GCC diagnostic warning \"-Woverride-init\"") \
const PARCObjectDescriptor parcObject_DescriptorName(_subtype)
-#endif
+#else
+#define parcObject_Extends(_subtype, _superType, ...) \
+ parcObjectDescriptor_Declaration(_subtype) = { \
+ .super = &parcObject_DescriptorName(_superType), \
+ .name = #_subtype, \
+ .objectSize = 0, \
+ .objectAlignment = 0, \
+ .destroy = NULL, \
+ .destructor = NULL, \
+ .release = NULL, \
+ .copy = NULL, \
+ .toString = NULL, \
+ .equals = NULL, \
+ .compare = NULL, \
+ .hashCode = NULL, \
+ .toJSON = NULL, \
+ .display = NULL, \
+ .isLockable = true, \
+ .typeState = NULL, \
+ __VA_ARGS__ \
+ }; \
+ const PARCObjectDescriptor parcObject_DescriptorName(_subtype)
+#endif
/**
* Define a new PARC Object implementation, by composing a new PARC Object Descriptor referencing an old one.