forked from google/autocxx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upcasting can change the value of a pointer in C++. This means anything upcasting needs both the parent and child class defined, which is awkward in user code when wrapping functions that accept ownership of a superclass object (it requires C++ code that depends on autocxx-generated C++ code that depends on the main C++ code, which then needs to be depended on by another iteration of autocxx to call it from Rust). Ideally this would be a static function in C++ to avoid some potential name conflicts that this approach produces (with C++ types sharing a name in separate namespaces), but I don't think cxx supports those yet (dtolnay/cxx#1036 and dtolnay/cxx#447).
- Loading branch information
1 parent
f9b24b9
commit 7bf667b
Showing
3 changed files
with
88 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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