Browse Source

buffer: remove a wrongly added attribute specifier

It doesn't seem to make much sense to have the mentioned typedef
declaration equipped with NODE_EXTERN. In fact, when compiling with GCC,
an attribute specifier like __attribute__((visibility("default"))) in
such a typedef declaration will cause the following warning message:

  warning: ‘visibility’ attribute ignored [-Wattributes]

The issue goes unnoticed because NODE_EXTERN is defined as nothing for
GCC builds, but for correctness it's better to not specify it here at
all.

PR-URL: https://github.com/nodejs/node/pull/14466
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
v6
Jiajie Hu 7 years ago
committed by Refael Ackermann
parent
commit
5796e44827
No known key found for this signature in database GPG Key ID: CD704BD80FDDDB64
  1. 2
      src/node_buffer.h

2
src/node_buffer.h

@ -34,7 +34,7 @@ namespace Buffer {
static const unsigned int kMaxLength =
sizeof(int32_t) == sizeof(intptr_t) ? 0x3fffffff : 0x7fffffff;
NODE_EXTERN typedef void (*FreeCallback)(char* data, void* hint);
typedef void (*FreeCallback)(char* data, void* hint);
NODE_EXTERN bool HasInstance(v8::Local<v8::Value> val);
NODE_EXTERN bool HasInstance(v8::Local<v8::Object> val);

Loading…
Cancel
Save