Skip to content

Commit 8bb0fcc

Browse files
committed
fix symbols for ABI
1 parent 60e03c9 commit 8bb0fcc

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

js/addon2.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
#include <stdio.h>
1414
#include <stdlib.h>
1515

16+
extern "C" {
17+
__thread custom_labels_hashmap_t *custom_labels_async_hashmap;
18+
}
19+
1620
namespace custom_labels {
1721
using v8::FunctionCallbackInfo;
1822
using v8::Isolate;
@@ -22,7 +26,6 @@ using v8::Object;
2226
using v8::String;
2327
using v8::Value;
2428

25-
__thread custom_labels_hashmap_t *custom_labels_async_hashmap;
2629

2730
#define hm custom_labels_async_hashmap
2831

src/customlabels.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010

1111
#define MAX(a,b) ((a) > (b) ? (a) : (b))
1212

13-
__attribute__((retain))
14-
const uint32_t custom_labels_abi_version = 1;
13+
extern "C" {
14+
__attribute__((retain))
15+
uint32_t custom_labels_abi_version = 1;
16+
}
1517

1618
struct _custom_labels_ls {
1719
custom_labels_label_t *storage;

0 commit comments

Comments
 (0)