#include <perl.h>
#include <XSUB.h>
+#define NEED_newSVpvn_flags
#include "ppport.h"
+/* for portability */
#ifndef newSVpvs_share
#define newSVpvs_share(s) Perl_newSVpvn_share(aTHX_ s, sizeof(s)-1, 0U)
#endif
+#ifndef GvNAME_get
+#define GvNAME_get GvNAME
+#endif
+#ifndef GvNAMELEN_get
+#define GvNAMELEN_get GvNAMELEN
+#endif
+
#ifndef mro_get_linear_isa
#define no_mro_get_linear_isa
#define mro_get_linear_isa(stash) mouse_mro_get_linear_isa(aTHX_ stash)
-AV* mouse_mro_get_linear_isa(pTHX_ HV* const stash)
+AV* mouse_mro_get_linear_isa(pTHX_ HV* const stash);
#endif /* !mro_get_linear_isa */
#ifndef mro_get_pkg_gen
#endif /* !no_mro_get_linear_isa */
#endif /* mro_get_package_gen */
-#define MOUSE_CALL_BOOT(name) STMT_START { \
+#define MOUSE_CALL_BOOT(name) STMT_START { \
EXTERN_C XS(CAT2(boot_, name)); \
PUSHMARK(SP); \
CALL_FPTR(CAT2(boot_, name))(aTHX_ cv); \
/* type constraints */
-int mouse_tc_check(pTHX_ mouse_tc const tc, SV* sv);
+int mouse_tc_check(pTHX_ SV* const tc, SV* const sv);
+int mouse_builtin_tc_check(pTHX_ mouse_tc const tc, SV* const sv);
int mouse_tc_Any (pTHX_ SV* const sv);
int mouse_tc_Bool (pTHX_ SV* const sv);