From 29c2151d8d4a08ed22a1d890011df4931b677ddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=B7=E6=B8=A1?= Date: Mon, 3 Oct 2022 21:09:58 -0700 Subject: [PATCH] fix missing dll exports (#1127) Summary: When I use libyogacore.so in other programming languages, it crash with message as > Could not obtain symbol from the library: dlsym(0x20b84d220, YGConfigIsExperimentalFeatureEnabled): symbol not found This function is defined as `WIN_EXPORT bool YGConfigIsExperimentalFeatureEnabled` in yoga.h, but is not defined using `YOGA_EXPORT` in yoga.cpp. Pull Request resolved: https://github.com/facebook/yoga/pull/1127 Reviewed By: yungsters Differential Revision: D40024450 Pulled By: yungsters fbshipit-source-id: f6f01eadccb13d593c68300059e96f4b0bbc9fb6 --- yoga/Yoga.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yoga/Yoga.cpp b/yoga/Yoga.cpp index 20389d4f24..8b275770bf 100644 --- a/yoga/Yoga.cpp +++ b/yoga/Yoga.cpp @@ -302,7 +302,7 @@ YOGA_EXPORT void YGNodeReset(YGNodeRef node) { node->reset(); } -int32_t YGConfigGetInstanceCount(void) { +YOGA_EXPORT int32_t YGConfigGetInstanceCount(void) { return gConfigInstanceCount; } @@ -4324,7 +4324,7 @@ YOGA_EXPORT void YGConfigSetExperimentalFeatureEnabled( config->experimentalFeatures[feature] = enabled; } -inline bool YGConfigIsExperimentalFeatureEnabled( +YOGA_EXPORT bool YGConfigIsExperimentalFeatureEnabled( const YGConfigRef config, const YGExperimentalFeature feature) { return config->experimentalFeatures[feature];