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 the MTRDevice ivars protected. #35101

Merged
merged 1 commit into from
Aug 20, 2024
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
15 changes: 1 addition & 14 deletions src/darwin/Framework/CHIP/MTRDevice_Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,7 @@ MTR_DIRECT_MEMBERS

@interface MTRDevice () {
// Ivars needed to implement shared MTRDevice functionality.
//
// Unfortunately, we can't use @protected here, because that exports the
// symbols (so that subclasses that are not part of the framework can see
// them), but TAPI does not see these declarations, because they are in a
// project header.
//
// Using @package means that the symbols do not need to be exported, but
// unfortunately gets treated as @public from inside our framework, which
// means random other framework code can access these ivars. Hopefully the
// naming with leading '_' will make it clearer that random other code
// should not touch these.
//
// TODO: Figure out some way of doing @protected but still not exporting the symbol.
@package
@protected
// Lock that protects overall device state, including delegate storage.
os_unfair_lock _lock;
NSMutableSet<MTRDeviceDelegateInfo *> * _delegates;
Expand Down
2 changes: 2 additions & 0 deletions src/darwin/Framework/Matter.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2565,6 +2565,7 @@
"-Wl,-unexported_symbol,\"___*\"",
"-Wl,-unexported_symbol,\"__Unwind_*\"",
"-Wl,-unexported_symbol,\"_unw_*\"",
"-Wl,-unexported_symbol,\"_OBJC_IVAR_*\"",
"-Wl,-hidden-lCHIP",
);
"OTHER_LDFLAGS[sdk=macosx*]" = (
Expand All @@ -2583,6 +2584,7 @@
"-Wl,-unexported_symbol,\"___*\"",
"-Wl,-unexported_symbol,\"__Unwind_*\"",
"-Wl,-unexported_symbol,\"_unw_*\"",
"-Wl,-unexported_symbol,\"_OBJC_IVAR_*\"",
"-Wl,-hidden-lCHIP",
);
PRODUCT_BUNDLE_IDENTIFIER = com.csa.matter;
Expand Down
Loading