Deleted YGSetMemoryFucs as it is unused
Reviewed By: emilsjolander Differential Revision: D6374147 fbshipit-source-id: 8c896dce23571268a1a52df5cc72486af9d66df7
This commit is contained in:
parent
33cefc1760
commit
d950dc6a21
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue