ext/rays/shader.cpp in rays-0.1.7 vs ext/rays/shader.cpp in rays-0.1.8

- old
+ new

@@ -6,17 +6,15 @@ using namespace Rucy; -static Class cShader; +RUCY_DEFINE_VALUE_FROM_TO(Rays::Shader) -RUCY_DEFINE_VALUE_FROM_TO(Rays::Shader, cShader) - #define THIS to<Rays::Shader*>(self) -#define CHECK RUCY_CHECK_OBJECT(Rays::Shader, cShader, self) +#define CHECK RUCY_CHECK_OBJECT(Rays::Shader, self) static RUCY_DEF_ALLOC(alloc, klass) { @@ -25,19 +23,21 @@ RUCY_END static RUCY_DEF1(initialize, source) { - RUCY_CHECK_OBJ(Rays::Shader, cShader, self); + RUCY_CHECK_OBJ(Rays::Shader, self); if (!source.is_s()) argument_error(__FILE__, __LINE__); *THIS = Rays::Shader(source.c_str()); return self; } RUCY_END + +static Class cShader; void Init_shader () { Module mRays = define_module("Rays");