Skip to content

[embind] Support policies in allow_subclass#26307

Open
brendandahl wants to merge 1 commit intoemscripten-core:mainfrom
brendandahl:embind-subclass-pointer
Open

[embind] Support policies in allow_subclass#26307
brendandahl wants to merge 1 commit intoemscripten-core:mainfrom
brendandahl:embind-subclass-pointer

Conversation

@brendandahl
Copy link
Collaborator

Add support for passing policies to the allow_subclass method in embind. This allows the use of constructors that require policies, such as those taking raw pointers, when enabling C++ subclassing from JavaScript.

Previously, allow_subclass only accepted a constructor argument, making it impossible to use policies like allow_raw_pointer with the generated 'implement' method.

Fixes #26270

Add support for passing policies to the allow_subclass method in
embind. This allows the use of constructors that require policies,
such as those taking raw pointers, when enabling C++ subclassing
from JavaScript.

Previously, allow_subclass only accepted a constructor argument,
making it impossible to use policies like allow_raw_pointer with the
generated 'implement' method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allow_subclass won't let me pass a pointer to the superclass constructor in emscripten 4.0.22

2 participants

Comments