Skip to content
This repository has been archived by the owner on May 31, 2019. It is now read-only.

Commit

Permalink
buffer: remove a wrongly added attribute specifier
Browse files Browse the repository at this point in the history
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: nodejs/node#14466
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Trevor Norris <[email protected]>
  • Loading branch information
hujiajie authored and hferreiro committed Nov 28, 2017
1 parent 764ca2f commit 488de2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ NODE_EXTERN void SetArrayBufferCreator(
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);
Expand Down

0 comments on commit 488de2b

Please sign in to comment.