-
Notifications
You must be signed in to change notification settings - Fork 30k
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
src: add include guards to internal headers #6948
Conversation
LGTM. Should this be documented in our addons docs? |
What in particular does 'this' refer to? |
@bnoordhuis In all of |
I only added it to the binding.gyp files from add-ons that As to documenting |
Heh, fair enough. |
Isn't this kind of breaking? |
Only on smartos, apparently. Jest aside, all of these files are internal - people are not supposed to be using them and if they do, they should expect things to break at any time. The installer doesn't install them. New CI: https://ci.nodejs.org/job/node-test-pull-request/2764/ |
Can you tell me why this compiles fine (tested on v4 and v6)? #include <v8.h>
#include <async-wrap.h>
#include <node.h>
namespace bmod {
using v8::FunctionCallbackInfo;
using v8::Value;
using v8::Local;
using v8::Object;
void Run(const FunctionCallbackInfo<Value>& args) {
fprintf(stderr, "NODE_ASYNC_ID_OFFSET: %i\n", NODE_ASYNC_ID_OFFSET);
}
void Init(Local<Object> exports) {
NODE_SET_METHOD(exports, "run", Run);
}
} // namespace bmod
NODE_MODULE(addon, bmod::Init) |
When I say installer, I mean If you use node-gyp though, that downloads and builds against the source tarball, and that does include internal headers. |
LGTM if CI is green |
LGTM |
For consistency with the newly added src/base64.h header, check that NODE_WANT_INTERNALS is defined and set in internal headers. PR-URL: nodejs#6948 Refs: nodejs#6910 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
c79a00d
to
eff96d3
Compare
For consistency with the newly added src/base64.h header, check that NODE_WANT_INTERNALS is defined and set in internal headers. PR-URL: nodejs#6948 Refs: nodejs#6910 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
For consistency with the newly added src/base64.h header, check that NODE_WANT_INTERNALS is defined and set in internal headers. PR-URL: #6948 Refs: #6910 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
@bnoordhuis lts? |
Let's not. |
For consistency with the newly added src/base64.h header, check that
NODE_WANT_INTERNALS is defined and set in internal headers.
Refs: #6910
CI: https://ci.nodejs.org/job/node-test-pull-request/2758/
R=@indutny @trevnorris