Skip to content

Commit 0ab328d

Browse files
Wrapped DRJIT_EXPORT in ifndef
1 parent ba91931 commit 0ab328d

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

include/drjit/traversable_base.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,16 @@
99

1010
NAMESPACE_BEGIN(drjit)
1111

12+
#if !defined(DRJIT_EXPORT)
13+
#if defined(_MSC_VER)
14+
#define DRJIT_EXPORT __declspec(dllexport)
15+
#else
16+
#define DRJIT_EXPORT __attribute__((visibility("default")))
17+
#endif
18+
#endif
19+
1220
/// Interface for traversing C++ objects.
13-
struct TraversableBase : nanobind::intrusive_base {
21+
struct DRJIT_EXPORT TraversableBase : public nanobind::intrusive_base {
1422
virtual void traverse_1_cb_ro(void *, void (*)(void *, uint64_t)) const = 0;
1523
virtual void traverse_1_cb_rw(void *, uint64_t (*)(void *, uint64_t)) = 0;
1624
};
@@ -70,10 +78,4 @@ public: \
7078
drjit::traverse_py_cb_rw(this, payload, fn); \
7179
}
7280

73-
#if defined(_MSC_VER)
74-
#define DRJIT_EXPORT __declspec(dllexport)
75-
#else
76-
#define DRJIT_EXPORT __attribute__((visibility("default")))
77-
#endif
78-
7981
NAMESPACE_END(drjit)

0 commit comments

Comments
 (0)