static struct SelDCSurface *checkSelDCSurface(lua_State *L, int where){
void *r = luaL_checkudata(L, where, "SelDCSurface");
luaL_argcheck(L, r != NULL, where, "'SelDCSurface' expected");
return (struct SelDCSurface *)r;
}
static int GetSize(lua_State *L){
/* Return surface's size
* <- width, hight
*/
struct SelDCSurface *srf = checkSelDCSurface(L, 1);
lua_pushnumber(L, srf->w);
lua_pushnumber(L, srf->h);
return 2;
}
---