Skip to content

Commit d950dc6

Browse files
priteshrnandgaonkarfacebook-github-bot
authored andcommittedNov 21, 2017
Deleted YGSetMemoryFucs as it is unused
Reviewed By: emilsjolander Differential Revision: D6374147 fbshipit-source-id: 8c896dce23571268a1a52df5cc72486af9d66df7
1 parent 33cefc1 commit d950dc6

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed
 

‎ReactCommon/yoga/yoga/Yoga.c

-20
Original file line numberDiff line numberDiff line change
@@ -3816,23 +3816,3 @@ void *YGConfigGetContext(const YGConfigRef config) {
38163816
void YGConfigSetNodeClonedFunc(const YGConfigRef config, const YGNodeClonedFunc callback) {
38173817
config->cloneNodeCallback = callback;
38183818
}
3819-
3820-
void YGSetMemoryFuncs(YGMalloc ygmalloc, YGCalloc yccalloc, YGRealloc ygrealloc, YGFree ygfree) {
3821-
YGAssert(gNodeInstanceCount == 0 && gConfigInstanceCount == 0,
3822-
"Cannot set memory functions: all node must be freed first");
3823-
YGAssert((ygmalloc == NULL && yccalloc == NULL && ygrealloc == NULL && ygfree == NULL) ||
3824-
(ygmalloc != NULL && yccalloc != NULL && ygrealloc != NULL && ygfree != NULL),
3825-
"Cannot set memory functions: functions must be all NULL or Non-NULL");
3826-
3827-
if (ygmalloc == NULL || yccalloc == NULL || ygrealloc == NULL || ygfree == NULL) {
3828-
gYGMalloc = &malloc;
3829-
gYGCalloc = &calloc;
3830-
gYGRealloc = &realloc;
3831-
gYGFree = &free;
3832-
} else {
3833-
gYGMalloc = ygmalloc;
3834-
gYGCalloc = yccalloc;
3835-
gYGRealloc = ygrealloc;
3836-
gYGFree = ygfree;
3837-
}
3838-
}

‎ReactCommon/yoga/yoga/Yoga.h

-3
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,4 @@ WIN_EXPORT YGConfigRef YGConfigGetDefault(void);
279279
WIN_EXPORT void YGConfigSetContext(const YGConfigRef config, void *context);
280280
WIN_EXPORT void *YGConfigGetContext(const YGConfigRef config);
281281

282-
WIN_EXPORT void
283-
YGSetMemoryFuncs(YGMalloc ygmalloc, YGCalloc yccalloc, YGRealloc ygrealloc, YGFree ygfree);
284-
285282
YG_EXTERN_C_END

0 commit comments

Comments
 (0)
Please sign in to comment.