Node.js API cleanup ideas for feedback #9766
Copy link
Copy link
Closed
Labels
c++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.
Description
- Version: 6.9.1/7.2.0/general
- Platform: UNIX/general
- Subsystem: src (general)
Considering that the node.h header is exported for both addons and embedders I see a few things that could be improved:
- Do not include node_internals.h (PR
comingnode.h [API] cleanup: remove node_internals.h & extra dependencies from node.h #9767) Cleanup orremove lines to define size_t/ssize_t for UNIX/Windows (node.h#L167-L176).Ideal may be node-specific size typedefs. Any other ideas @tjfontaine?(now part of PR node.h [API] cleanup: remove node_internals.h & extra dependencies from node.h #9767)_
Will discuss the remaining ideas elsewhere (related to nodejs/api#31):
Break node.h into the smaller parts such as:API for addonsexternal API for embedder(s)type definitions
Other ideas:
Keep the definition ofnode_moduleinternalC API for Node embedders
I would be happy to submit PRs for whatever ideas may be desired by the community.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
c++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.
Activity
Fishrock123 commentedon Nov 23, 2016
Please see nodejs/api#31 :)
Fishrock123 commentedon Nov 23, 2016
cc @nodejs/api @nodejs/addon-api
bnoordhuis commentedon Nov 23, 2016
I think we can simply replace that with a
#include <stddef.h>because it's a workaround for old Visual Studio versions that we no longer support. No need for custom typedefs.Can you go into more detail?
brody2consult commentedon Nov 23, 2016
See PR #9767
node.hincludesv8.hwhich in turn includesstddef.h- PR #9767 is now updated to take the lines out - I hope this is good enough.Thanks @Fishrock123!
Fixes are in PR #9767, other changes will be discussed in API/EPS issues. Closing this one, looking forward to getting #9767 reviewed.