X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcommon_stub.hpp;h=45aa0caedb58613b858c66f86bd1a974ffc552a1;hb=cb728132e1c5cb0a171ee09e9b3ced16da08f796;hp=ad152560a3b2bac3fd7b5133835683a0d83b7737;hpb=9d19c60e10c9572885509b35c2b72f362968d6ab;p=SXSI%2Fxpathcomp.git diff --git a/src/common_stub.hpp b/src/common_stub.hpp index ad15256..45aa0ca 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 @@ -13,6 +13,8 @@ extern "C" { #include } #include +#include +#include #define NoAlloc @@ -25,6 +27,7 @@ value alloc_custom_(char* name); template X& Obj_val(value v) { + assert(Tag_val(v) == Custom_tag); return * (X*) Data_custom_val(v); }