Repository navigation
NSData default constructor to avoid stripping - #54
Closed
EliseoDiegoViola-Snowprint wants to merge 1 commit into
Closed
EliseoDiegoViola-Snowprint wants to merge 1 commit into
EliseoDiegoViola-Snowprint wants to merge 1 commit into
Conversation
ryzngard
reviewed
Dec 3, 2025
ryzngard
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the submission and sorry for the delay! I have another PR to address some code stripping #73 , does that solve the issue you were hitting?
Overall I think this change can be simplified to not go across ABI and instead have a default pointer.
| /// <summary> | ||
| /// Default constructor that initializes an empty NSData instance. | ||
| /// </summary> | ||
| public NSData() : base(CreateEmptyNSData()) |
Collaborator
There was a problem hiding this comment.
Is there a reason to not just use default for the pointer? It looks like that should be handled correctly everywhere
Author
Collaborator
|
Closing since #73 is now merged |
kuoliangkwong
pushed a commit
to kuoliangkwong/unityplugins
that referenced
this pull request
Jan 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These changes add a way to get an empty NSData using a default constructor.
This is needed since GKLocalPlayer.Local.FetchItems() eventually calls OnFetchItems which requires to create an empty NSData at the moment of deserialization.