X-Git-Url: https://git.jsancho.org/?p=guile-irrlicht.git;a=blobdiff_plain;f=src%2Fwrapped.h;fp=src%2Fwrapped.h;h=5ffafb6745c10f3ece617a9d4dd7fe3c527774c4;hp=daaaa25404d07c95e32fd71f7e6d7a927e100353;hb=8876c6e31fddf00f9764d9fe73930d8dc8fc6c4a;hpb=898d352f35f3f007dd4c1f49091f38bdeb012fd3 diff --git a/src/wrapped.h b/src/wrapped.h index daaaa25..5ffafb6 100644 --- a/src/wrapped.h +++ b/src/wrapped.h @@ -32,7 +32,7 @@ WRAP (TYPE foreign_obj); \ \ TYPE \ - UNWRAP (SCM wrapped_obj); \ + UNWRAP (SCM wrapped_obj, bool assert_type = true); \ \ bool \ PRED (SCM wrapped_obj); @@ -62,9 +62,12 @@ } \ \ TYPE \ - UNWRAP (SCM wrapped_obj) \ + UNWRAP (SCM wrapped_obj, bool assert_type) \ { \ - scm_assert_foreign_object_type (wrapped_##INIT, wrapped_obj); \ + if (assert_type) \ + { \ + scm_assert_foreign_object_type (wrapped_##INIT, wrapped_obj); \ + } \ return (TYPE)scm_foreign_object_ref (wrapped_obj, 0); \ } \ \