You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2020/02/06 21:57:13 UTC

[couchdb-jiffy] 01/03: Force Windows to export inlined functions

This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-jiffy.git

commit 265be337f8c9dce338c09be80c3e9e91e2ea1d92
Author: Joan Touzet <jo...@atypical.net>
AuthorDate: Thu Feb 6 15:55:10 2020 -0500

    Force Windows to export inlined functions
---
 c_src/termstack.h | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/c_src/termstack.h b/c_src/termstack.h
index ce46769..d1f8ee4 100644
--- a/c_src/termstack.h
+++ b/c_src/termstack.h
@@ -6,6 +6,12 @@
 
 #include "erl_nif.h"
 
+#ifdef _WIN32
+#define JIFFY_EXPORT __declspec(dllexport)
+#else
+#define JIFFY_EXPORT
+#endif
+
 #define SMALL_TERMSTACK_SIZE 16
 
 typedef struct {
@@ -21,8 +27,8 @@ ERL_NIF_TERM termstack_save(ErlNifEnv* env, TermStack* stack);
 int termstack_restore(ErlNifEnv* env, ERL_NIF_TERM from, TermStack* stack);
 void termstack_destroy(TermStack* stack);
 
-void termstack_push(TermStack* stack, ERL_NIF_TERM term);
-ERL_NIF_TERM termstack_pop(TermStack* stack);
-int termstack_is_empty(TermStack* stack);
+JIFFY_EXPORT void termstack_push(TermStack* stack, ERL_NIF_TERM term);
+JIFFY_EXPORT ERL_NIF_TERM termstack_pop(TermStack* stack);
+JIFFY_EXPORT int termstack_is_empty(TermStack* stack);
 
 #endif