projects
/
SXSI
/
xpathcomp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix a subtle bug where OCaml/C function stack are not aligned on a 16 byte
[SXSI/xpathcomp.git]
/
src
/
common_stub.hpp
diff --git
a/src/common_stub.hpp
b/src/common_stub.hpp
index
45aa0ca
..
b771f33
100644
(file)
--- a/
src/common_stub.hpp
+++ b/
src/common_stub.hpp
@@
-18,6
+18,10
@@
extern "C" {
#define NoAlloc
#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,
void register_custom_(char* name,
size_t size,
@@
-58,8
+62,7
@@
sxsi_alloc_custom(void (*finalize)(value) = sxsi_finalize_custom<X>)
void sxsi_raise_msg(const char * msg);
void sxsi_raise_msg(const char * msg);
-extern "C" value sxsi_cpp_init(value unit);
-
+ML_BINDING value sxsi_cpp_init(value unit);
#endif
#endif