diff --git a/bindings/ruby/sfml-graphics/graphics/main.cpp b/bindings/ruby/sfml-graphics/graphics/main.cpp index 9779ad254..8a6e487b9 100644 --- a/bindings/ruby/sfml-graphics/graphics/main.cpp +++ b/bindings/ruby/sfml-graphics/graphics/main.cpp @@ -70,15 +70,15 @@ static void CreateBlendEnum( void ) void Init_graphics( void ) { /* SFML namespace which contains the classes of this module. */ - /*globalSFMLNamespace = rb_define_module( "SFML" );*/ + globalSFMLNamespace = rb_define_module( "SFML" ); if( CheckDependencies() == false ) { rb_raise( rb_eRuntimeError, "This module depends on sfml-window" ); } - /*globalVector2Class = RetrieveSFMLClass( "Vector2" ); - globalVector3Class = RetrieveSFMLClass( "Vector3" );*/ + globalVector2Class = RetrieveSFMLClass( "Vector2" ); + globalVector3Class = RetrieveSFMLClass( "Vector3" ); globalWindowClass = RetrieveSFMLClass( "Window" ); - /*globalNonCopyableModule = RetrieveSFMLClass( "NonCopyable" );*/ + globalNonCopyableModule = RetrieveSFMLClass( "NonCopyable" ); rb_define_const(globalSFMLNamespace, "GraphicsLoaded", Qtrue); CreateBlendEnum(); diff --git a/bindings/ruby/sfml-window/window/main.cpp b/bindings/ruby/sfml-window/window/main.cpp index b238b1a46..a38aac4c9 100644 --- a/bindings/ruby/sfml-window/window/main.cpp +++ b/bindings/ruby/sfml-window/window/main.cpp @@ -162,7 +162,6 @@ void Init_window( void ) rb_raise( rb_eRuntimeError, "This module depends on sfml-system" ); } - globalVector2Class = rb_define_class_under(globalSFMLNamespace, "Vector2", rb_cObject ); globalNonCopyableModule = rb_define_module_under(globalSFMLNamespace, "NonCopyable"); diff --git a/bindings/ruby/shared/NonCopyable.hpp b/bindings/ruby/shared/NonCopyable.hpp index 5f8166e50..45e8e319e 100644 --- a/bindings/ruby/shared/NonCopyable.hpp +++ b/bindings/ruby/shared/NonCopyable.hpp @@ -25,6 +25,8 @@ #include "ruby.h" +extern VALUE globalNonCopyableModule; + void Init_NonCopyable( void ); #endif // SFML_RUBYEXT_NON_COPYABLE_HEADER_ diff --git a/bindings/ruby/shared/Vector2.hpp b/bindings/ruby/shared/Vector2.hpp index 729c77eb8..72d561ef7 100644 --- a/bindings/ruby/shared/Vector2.hpp +++ b/bindings/ruby/shared/Vector2.hpp @@ -25,6 +25,8 @@ #include "ruby.h" +extern VALUE globalVector2Class; + VALUE Vector2_GetX( VALUE self ); VALUE Vector2_GetY( VALUE self ); diff --git a/bindings/ruby/shared/Vector3.hpp b/bindings/ruby/shared/Vector3.hpp index 5a438d90f..6ad35de5f 100644 --- a/bindings/ruby/shared/Vector3.hpp +++ b/bindings/ruby/shared/Vector3.hpp @@ -25,6 +25,8 @@ #include "ruby.h" +extern VALUE globalVector3Class; + VALUE Vector3_GetX( VALUE self ); VALUE Vector3_GetY( VALUE self ); VALUE Vector3_GetZ( VALUE self );