X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2Fcommon_stub.hpp;fp=src%2Fcommon_stub.hpp;h=b771f338f16c684c33d705afaa23e6e8cedde7da;hb=046839a3969319f5d38e8f72fe9cb640a639af6c;hp=45aa0caedb58613b858c66f86bd1a974ffc552a1;hpb=6d471b1d8d9545dd8ee0ea6772b0d8253c981d96;p=SXSI%2Fxpathcomp.git diff --git a/src/common_stub.hpp b/src/common_stub.hpp index 45aa0ca..b771f33 100644 --- a/src/common_stub.hpp +++ b/src/common_stub.hpp @@ -18,6 +18,10 @@ extern "C" { #define NoAlloc +//Must be used in front of every function that is called from OCaml. + +#define ML_BINDING extern "C" __attribute__ ((force_align_arg_pointer)) + void register_custom_(char* name, size_t size, @@ -58,8 +62,7 @@ sxsi_alloc_custom(void (*finalize)(value) = sxsi_finalize_custom) void sxsi_raise_msg(const char * msg); -extern "C" value sxsi_cpp_init(value unit); - +ML_BINDING value sxsi_cpp_init(value unit); #endif