ext/rays/image.cpp in rays-0.1.2 vs ext/rays/image.cpp in rays-0.1.3

- old
+ new

@@ -1,12 +1,12 @@ #include "rays/ruby/image.h" #include <rucy.h> -#include "rays.h" -#include "rays/ruby/bitmap.h" -#include "rays/ruby/texture.h" +#include <rays/ruby/bitmap.h> +#include <rays/ruby/texture.h> +#include "defs.h" using namespace Rucy; using Rays::coord; @@ -14,15 +14,16 @@ namespace Rays { + static Class cImage; + Class image_class () { - static Class c = rays_module().define_class("Image"); - return c; + return cImage; } }// Rays @@ -152,15 +153,19 @@ void Init_image () { - Rays::image_class() - .define_alloc_func(alloc) - .define_method("initialize", initialize) - .define_method("width", width) - .define_method("height", height) - .define_method("color_space", color_space) - .define_method("bitmap", bitmap) - .define_method("texture", texture) - .define_function("load", load); + Module m = define_module("Rays"); + + Class c = m.define_class("Image"); + Rays::cImage = c; + + c.define_alloc_func(alloc); + c.define_method("initialize", initialize); + c.define_method("width", width); + c.define_method("height", height); + c.define_method("color_space", color_space); + c.define_method("bitmap", bitmap); + c.define_method("texture", texture); + c.define_function("load", load); }