Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ASPerformMainThreadDeallocation visible in C #952

Merged
merged 2 commits into from
Jun 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
14 changes: 7 additions & 7 deletions Source/ASDisplayNodeExtras.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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) {
Expand Down Expand Up @@ -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 @"{ }";
Expand All @@ -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
*/
Expand Down Expand Up @@ -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

Expand Down