Make ASPerformMainThreadDeallocation visible in C (#952)

* Make ASPerformMainThreadDeallocation visible in C

* Update changelog
This commit is contained in:
Adlai Holler 2018-06-01 13:54:46 -07:00 committed by GitHub
parent 079c11b756
commit ee06e97e0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View File

@ -1,5 +1,6 @@
## master
* Add your own contributions to the next release on the line below this with your name.
- Make `ASPerformMainThreadDeallocation` visible in C. [Adlai Holler](https://github.com/Adlai-Holler)
## 2.7
- Fix pager node for interface coalescing. [Max Wang](https://github.com/wsdwsd0829) [#877](https://github.com/TextureGroup/Texture/pull/877)

View File

@ -34,6 +34,10 @@
#define ASSetDebugNames(...)
#endif
NS_ASSUME_NONNULL_BEGIN
ASDISPLAYNODE_EXTERN_C_BEGIN
/// For deallocation of objects on the main thread across multiple run loops.
extern void ASPerformMainThreadDeallocation(id _Nullable __strong * _Nonnull objectPtr);
@ -59,7 +63,7 @@ ASDISPLAYNODE_INLINE BOOL ASInterfaceStateIncludesMeasureLayout(ASInterfaceState
return ((interfaceState & ASInterfaceStateMeasureLayout) == ASInterfaceStateMeasureLayout);
}
__unused static NSString * _Nonnull NSStringFromASInterfaceState(ASInterfaceState interfaceState)
__unused static NSString * NSStringFromASInterfaceState(ASInterfaceState interfaceState)
{
NSMutableArray *states = [NSMutableArray array];
if (interfaceState == ASInterfaceStateNone) {
@ -88,7 +92,7 @@ __unused static NSString * _Nonnull NSStringFromASInterfaceState(ASInterfaceStat
/// e.g. { +Visible, -Preload } (although that should never actually happen.)
/// NOTE: Changes to MeasureLayout state don't really mean anything so we omit them for now.
__unused static NSString * _Nonnull NSStringFromASInterfaceStateChange(ASInterfaceState oldState, ASInterfaceState newState)
__unused static NSString *NSStringFromASInterfaceStateChange(ASInterfaceState oldState, ASInterfaceState newState)
{
if (oldState == newState) {
return @"{ }";
@ -104,10 +108,6 @@ __unused static NSString * _Nonnull NSStringFromASInterfaceStateChange(ASInterfa
#undef INTERFACE_STATE_DELTA
NS_ASSUME_NONNULL_BEGIN
ASDISPLAYNODE_EXTERN_C_BEGIN
/**
Returns the appropriate interface state for a given ASDisplayNode and window
*/
@ -218,7 +218,7 @@ extern void ASDisplayNodeDisableHierarchyNotifications(ASDisplayNode *node);
extern void ASDisplayNodeEnableHierarchyNotifications(ASDisplayNode *node);
// Not to be called directly.
extern void _ASSetDebugNames(Class _Nonnull owningClass, NSString * _Nonnull names, ASDisplayNode * _Nullable object, ...);
extern void _ASSetDebugNames(Class owningClass, NSString *names, ASDisplayNode *object, ...);
ASDISPLAYNODE_EXTERN_C_END