From d5992106dd451f98a93cd99deff15bbc95394675 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Thu, 7 Jan 2016 10:49:09 -0800 Subject: [PATCH] Include the class name in the IMPLEMENT_WRAPPERTYPEINFO macro expansion This allow multiple uses of IMPLEMENT_WRAPPERTYPEINFO within a source file --- sky/engine/tonic/dart_wrappable.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sky/engine/tonic/dart_wrappable.h b/sky/engine/tonic/dart_wrappable.h index 0be3eea86e4..ee7ae76126c 100644 --- a/sky/engine/tonic/dart_wrappable.h +++ b/sky/engine/tonic/dart_wrappable.h @@ -66,19 +66,19 @@ class DartWrappable { static const DartWrapperInfo& dart_wrapper_info_ #define IMPLEMENT_WRAPPERTYPEINFO(ClassName) \ -static void RefObject(DartWrappable* impl) { \ +static void RefObject_##ClassName(DartWrappable* impl) { \ static_cast(impl)->ref(); \ } \ -static void DerefObject(DartWrappable* impl) { \ +static void DerefObject_##ClassName(DartWrappable* impl) { \ static_cast(impl)->deref(); \ } \ -static const DartWrapperInfo kDartWrapperInfo = { \ +static const DartWrapperInfo kDartWrapperInfo_##ClassName = { \ #ClassName, \ sizeof(ClassName), \ - &RefObject, \ - &DerefObject, \ + &RefObject_##ClassName, \ + &DerefObject_##ClassName, \ }; \ -const DartWrapperInfo& ClassName::dart_wrapper_info_ = kDartWrapperInfo; \ +const DartWrapperInfo& ClassName::dart_wrapper_info_ = kDartWrapperInfo_##ClassName; struct DartConverterWrappable { static DartWrappable* FromDart(Dart_Handle handle);