Skip to content

Commit d9a14c2

Browse files
committed
Fix ext/-test-/namespace/yay{1,2} for mswin
Visual C: ``` compiling ../../../../../src/ext/-test-/namespace/yay1/yay1.c yay1.c ../../../../../src/ext/-test-/namespace/yay1/yay1.c(4): warning C4273: 'yay_value': inconsistent dll linkage C:\a\ruby\ruby\src\ext\-test-\namespace\yay1\yay1.h(4): note: see previous definition of 'yay_value' linking shared-object -test-/namespace/yay1.so Creating library yay1-arm64-mswin64_140.lib and object yay1-arm64-mswin64_140.exp yay1-arm64-mswin64_140.exp : warning LNK4070: /OUT:yay1.dll directive in .EXP differs from output filename '..\..\..\..\.ext\arm64-mswin64_140\-test-\namespace\yay1.so'; ignoring directive compiling ../../../../../src/ext/-test-/namespace/yay2/yay2.c yay2.c ../../../../../src/ext/-test-/namespace/yay2/yay2.c(4): warning C4273: 'yay_value': inconsistent dll linkage C:\a\ruby\ruby\src\ext\-test-\namespace\yay2\yay2.h(4): note: see previous definition of 'yay_value' linking shared-object -test-/namespace/yay2.so Creating library yay2-arm64-mswin64_140.lib and object yay2-arm64-mswin64_140.exp yay2-arm64-mswin64_140.exp : warning LNK4070: /OUT:yay2.dll directive in .EXP differs from output filename '..\..\..\..\.ext\arm64-mswin64_140\-test-\namespace\yay2.so'; ignoring directive ``` From MinGW gcc: ``` ../../../../../src/ext/-test-/namespace/yay1/yay1.c:4:1: warning: 'yay_value' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 4 | yay_value(void) | ^~~~~~~~~ ../../../../../src/ext/-test-/namespace/yay2/yay2.c:4:1: warning: 'yay_value' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 4 | yay_value(void) | ^~~~~~~~~ ```
1 parent 2a6b469 commit d9a14c2

File tree

4 files changed

+2
-4
lines changed

4 files changed

+2
-4
lines changed

ext/-test-/namespace/yay1/yay1.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
LIBRARY yay1
21
EXPORTS
32
Init_yay1
43
yay_value

ext/-test-/namespace/yay1/yay1.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#include <ruby.h>
22
#include "ruby/internal/dllexport.h"
33

4-
RUBY_EXTERN VALUE yay_value(void);
4+
RUBY_FUNC_EXPORTED VALUE yay_value(void);

ext/-test-/namespace/yay2/yay2.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
LIBRARY yay2
21
EXPORTS
32
Init_yay2
43
yay_value

ext/-test-/namespace/yay2/yay2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#include <ruby.h>
22
#include "ruby/internal/dllexport.h"
33

4-
RUBY_EXTERN VALUE yay_value(void);
4+
RUBY_FUNC_EXPORTED VALUE yay_value(void);

0 commit comments

Comments
 (0)