Repository navigation
chore(swig): ignore C++ move constructors and assignment operators in .i files - #1580
Open
AustinBenoit wants to merge 1 commit into
Open
AustinBenoit wants to merge 1 commit into
AustinBenoit wants to merge 1 commit into
Conversation
…files Prepares Unity SWIG bindings for firebase/firebase-cpp-sdk#1995 removing the always-defined FIREBASE_USE_MOVE_OPERATORS and FIREBASE_USE_STD_FUNCTION macros from C++ headers: - database/src/swig/database.i: ignore MutableData::MutableData so the move-only constructor does not leak into InternalMutableData.cs when unwrapped in C++. - app/src/swig/future.i: ignore FutureBase::FutureBase(FutureBase&&) to match existing FutureBase::operator= ignore. - storage/src/swig/storage.i: broaden copy-only operator=(const T&) ignores on StorageReference, Metadata, and Controller to unqualified operator=, and ignore StorageListResult::operator=.
1 of 3 tasks
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates SWIG interface files for the Firebase C++ SDK to ignore move constructors, constructors, and assignment operators that are not supported or needed by C# proxies. Specifically, it ignores the FutureBase move constructor, the MutableData constructor, and several assignment operators across StorageReference, Metadata, Controller, and StorageListResult. I have no feedback to provide.
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.
Description
Companion PR for firebase/firebase-cpp-sdk#1995 (which removes the always-defined
FIREBASE_USE_MOVE_OPERATORSandFIREBASE_USE_STD_FUNCTIONmacros from C++ headers).Because SWIG does not follow
#include "firebase/internal/common.h", those macros were previously undefined during Unity SWIG runs. Unwrapping them infirebase-cpp-sdkfollows the modern convention of keeping C++ public headers free of#ifndef SWIGfor move operations and handling ignores in Unity.ifiles instead:database/src/swig/database.i: add%ignore firebase::database::MutableData::MutableData;so the move-only constructor does not emit a newpublic InternalMutableData(InternalMutableData rhs)C# constructor.app/src/swig/future.i: add%ignore FutureBase::FutureBase(FutureBase&&);alongside%ignore FutureBase::operator=;to prevent a new SWIGWarning 516.storage/src/swig/storage.i: generalize signature-qualifiedoperator=(const T&)ignores onStorageReference,Metadata, andControllerto unqualifiedoperator=, and add%ignore firebase::storage::StorageListResult::operator=;.Safe to merge independently before or alongside firebase/firebase-cpp-sdk#1995.
Testing
.imodules for both:firebase-cpp-sdkorigin/main+ this Unity branch -> 0 functional C#/C++ diff vs baseline.firebase-cpp-sdkPR #1995 + this Unity branch -> 0 functional C# diff across all 10 modules (confirmingInternalMutableData.csis unchanged andapp/storageemit zero new SWIG warnings).