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

Modify doc for napi_define_class to be less C++-specific #36150

Closed
gabrielschulhof opened this issue Nov 17, 2020 · 1 comment
Closed

Modify doc for napi_define_class to be less C++-specific #36150

gabrielschulhof opened this issue Nov 17, 2020 · 1 comment

Comments

@gabrielschulhof
Copy link
Contributor

The doc for napi_define_class pretty much assumes an ObjectWrap scenario in that a C++ class will be associated one-to-one with the JS class being defined. This is not necessarily and always the case. We should limit the doc to what can be done in C.

@gabrielschulhof
Copy link
Contributor Author

... or at least de-emphasize the ObjectWrap use case.

gabrielschulhof pushed a commit to gabrielschulhof/node that referenced this issue Nov 18, 2020
Change the documentation for `napi_define_class` in such a way that
it mentions wrapping C++ class instances as a possible use for the API,
rather than making the assumption that it is the use case for the API.

Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
Fixes: nodejs#36150
codebytere pushed a commit that referenced this issue Nov 22, 2020
Change the documentation for `napi_define_class` in such a way that
it mentions wrapping C++ class instances as a possible use for the API,
rather than making the assumption that it is the use case for the API.

Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
Co-authored-by: Rich Trott <rtrott@gmail.com>
Fixes: #36150
PR-URL: #36159
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
BethGriggs pushed a commit that referenced this issue Dec 10, 2020
Change the documentation for `napi_define_class` in such a way that
it mentions wrapping C++ class instances as a possible use for the API,
rather than making the assumption that it is the use case for the API.

Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
Co-authored-by: Rich Trott <rtrott@gmail.com>
Fixes: #36150
PR-URL: #36159
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
BethGriggs pushed a commit that referenced this issue Dec 10, 2020
Change the documentation for `napi_define_class` in such a way that
it mentions wrapping C++ class instances as a possible use for the API,
rather than making the assumption that it is the use case for the API.

Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
Co-authored-by: Rich Trott <rtrott@gmail.com>
Fixes: #36150
PR-URL: #36159
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
BethGriggs pushed a commit that referenced this issue Dec 15, 2020
Change the documentation for `napi_define_class` in such a way that
it mentions wrapping C++ class instances as a possible use for the API,
rather than making the assumption that it is the use case for the API.

Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
Co-authored-by: Rich Trott <rtrott@gmail.com>
Fixes: #36150
PR-URL: #36159
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
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 a pull request may close this issue.

1 participant