--- a/pocaml_c.c +++ b/pocaml_c.c @@ -183,12 +183,12 @@ CAMLparam1 (svv); SV *sv = Sv_val (svv); + if (SvROK(sv)) CAMLreturn (Val_int (4)); switch (SvTYPE (sv)) { case SVt_IV: CAMLreturn (Val_int (1)); case SVt_NV: CAMLreturn (Val_int (2)); case SVt_PV: CAMLreturn (Val_int (3)); - case SVt_RV: CAMLreturn (Val_int (4)); case SVt_PVAV: CAMLreturn (Val_int (5)); case SVt_PVHV: CAMLreturn (Val_int (6)); case SVt_PVCV: CAMLreturn (Val_int (7)); @@ -266,7 +266,6 @@ case SVt_IV: case SVt_NV: case SVt_PV: - case SVt_RV: case SVt_PVMG: break; default: