author | Francesco Abbate <francesco.bbt@gmail.com> | 2012年10月16日 13:16:27 +0200 |
---|---|---|
committer | Francesco Abbate <francesco.bbt@gmail.com> | 2012年10月16日 13:16:27 +0200 |
commit | cc9e4f31b3dc21196c5ca27ad6703dcfcadda648 (patch) | |
tree | 35784ccfb1f272145c9c3a22225cfb3e7ef1a6d2 /agg-plot/lua-cpp-utils.h | |
parent | fa7f82698332f2f90422b0ff6a0b40ae7072332e (diff) | |
download | gsl-shell-cc9e4f31b3dc21196c5ca27ad6703dcfcadda648.tar.gz |
-rw-r--r-- | agg-plot/lua-cpp-utils.h | 6 |
diff --git a/agg-plot/lua-cpp-utils.h b/agg-plot/lua-cpp-utils.h index 8f18d5a9..1f0a56b0 100644 --- a/agg-plot/lua-cpp-utils.h +++ b/agg-plot/lua-cpp-utils.h @@ -73,4 +73,10 @@ T* object_check (lua_State *L, int index, enum gs_type_e tp) return (T *) gs_check_userdata (L, index, tp); } +template <class T> +T* object_cast (lua_State *L, int index, enum gs_type_e tp) +{ + return (T *) gs_is_userdata (L, index, tp); +} + #endif |