Skip to content

Commit 2c364ab

Browse files
hujiajieaddaleax
authored andcommitted
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: #14466 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Trevor Norris <[email protected]>
1 parent 5844691 commit 2c364ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_buffer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace Buffer {
3434
static const unsigned int kMaxLength =
3535
sizeof(int32_t) == sizeof(intptr_t) ? 0x3fffffff : 0x7fffffff;
3636

37-
NODE_EXTERN typedef void (*FreeCallback)(char* data, void* hint);
37+
typedef void (*FreeCallback)(char* data, void* hint);
3838

3939
NODE_EXTERN bool HasInstance(v8::Local<v8::Value> val);
4040
NODE_EXTERN bool HasInstance(v8::Local<v8::Object> val);

0 commit comments

Comments
 (0)