Permalink
Browse files

Deleted YGSetMemoryFucs as it is unused

Reviewed By: emilsjolander

Differential Revision: D6374147

fbshipit-source-id: 8c896dce23571268a1a52df5cc72486af9d66df7
  • Loading branch information...
priteshrnandgaonkar authored and facebook-github-bot committed Nov 21, 2017
1 parent 33cefc1 commit d950dc6a21c5cc1e736993b2ecc16abae086389e
Showing with 0 additions and 23 deletions.
  1. +0 −20 ReactCommon/yoga/yoga/Yoga.c
  2. +0 −3 ReactCommon/yoga/yoga/Yoga.h
@@ -3816,23 +3816,3 @@ void *YGConfigGetContext(const YGConfigRef config) {
void YGConfigSetNodeClonedFunc(const YGConfigRef config, const YGNodeClonedFunc callback) {
config->cloneNodeCallback = callback;
}
void YGSetMemoryFuncs(YGMalloc ygmalloc, YGCalloc yccalloc, YGRealloc ygrealloc, YGFree ygfree) {
YGAssert(gNodeInstanceCount == 0 && gConfigInstanceCount == 0,
"Cannot set memory functions: all node must be freed first");
YGAssert((ygmalloc == NULL && yccalloc == NULL && ygrealloc == NULL && ygfree == NULL) ||
(ygmalloc != NULL && yccalloc != NULL && ygrealloc != NULL && ygfree != NULL),
"Cannot set memory functions: functions must be all NULL or Non-NULL");
if (ygmalloc == NULL || yccalloc == NULL || ygrealloc == NULL || ygfree == NULL) {
gYGMalloc = &malloc;
gYGCalloc = &calloc;
gYGRealloc = &realloc;
gYGFree = &free;
} else {
gYGMalloc = ygmalloc;
gYGCalloc = yccalloc;
gYGRealloc = ygrealloc;
gYGFree = ygfree;
}
}
@@ -279,7 +279,4 @@ WIN_EXPORT YGConfigRef YGConfigGetDefault(void);
WIN_EXPORT void YGConfigSetContext(const YGConfigRef config, void *context);
WIN_EXPORT void *YGConfigGetContext(const YGConfigRef config);
WIN_EXPORT void
YGSetMemoryFuncs(YGMalloc ygmalloc, YGCalloc yccalloc, YGRealloc ygrealloc, YGFree ygfree);
YG_EXTERN_C_END

0 comments on commit d950dc6

Please sign in to comment.