X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2Fcommon_stub.hpp;h=6bfb57d787e30de51fc5ad8401a5de9e5103aec3;hb=16e61f135ed3043f4c656c423c67654ceb058411;hp=47b6dcd7e5ba98d7ac1d2836128039b84dd20c58;hpb=4fb1afc60e3af83e6184c77ea2cb002def542a96;p=SXSI%2Fxpathcomp.git diff --git a/src/common_stub.hpp b/src/common_stub.hpp index 47b6dcd..6bfb57d 100644 --- a/src/common_stub.hpp +++ b/src/common_stub.hpp @@ -1,5 +1,5 @@ -#ifndef COMMON_STUB_H_ -#define COMMON_STUB_H_ +#ifndef COMMON_STUB_HPP_ +#define COMMON_STUB_HPP_ extern "C" { #define CAML_NAME_SPACE @@ -14,6 +14,8 @@ extern "C" { } #include +#define NoAlloc + void register_custom_(char* name, size_t size, @@ -38,7 +40,8 @@ template void sxsi_finalize_custom(value v) sxsi_finalize_obj(Obj_val(v)); } -template value sxsi_alloc_custom(void (*finalize)(value) = sxsi_finalize_custom) +template value +sxsi_alloc_custom(void (*finalize)(value) = sxsi_finalize_custom) { char * name = const_cast(typeid(X).name()); @@ -50,7 +53,7 @@ template value sxsi_alloc_custom(void (*finalize)(value) = sxsi_finali return v; } -void sxsi_raise_msg(char * msg); +void sxsi_raise_msg(const char * msg); extern "C" value sxsi_cpp_init(value unit);