From 2a79a3ec4908abc2ebd74b45276637fc5c9e349d Mon Sep 17 00:00:00 2001 From: groogy Date: Wed, 26 Jan 2011 21:51:34 +0000 Subject: [PATCH] Added so that version information is available in the SFML namespace. git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1778 4e206d99-4929-0410-ac5d-dfc041789085 --- bindings/ruby/sfml-system/system/main.cpp | 2 ++ bindings/ruby/sfml-system/system/main.hpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/bindings/ruby/sfml-system/system/main.cpp b/bindings/ruby/sfml-system/system/main.cpp index 0439606f..6f12fadf 100644 --- a/bindings/ruby/sfml-system/system/main.cpp +++ b/bindings/ruby/sfml-system/system/main.cpp @@ -44,6 +44,8 @@ void Init_system( void ) /* SFML namespace which contains the classes of this module. */ globalSFMLNamespace = rb_define_module( "SFML" ); rb_define_const(globalSFMLNamespace, "SystemLoaded", Qtrue); + rb_define_const(globalSFMLNamespace, "Version", rb_str_new2(LIB_VERSION)); + rb_define_const(globalSFMLNamespace, "BindingVersion", rb_str_new2(BINDING_VERSION)); Init_Clock(); Init_Vector2(); Init_Vector3(); diff --git a/bindings/ruby/sfml-system/system/main.hpp b/bindings/ruby/sfml-system/system/main.hpp index c6a981fb..86b042b2 100644 --- a/bindings/ruby/sfml-system/system/main.hpp +++ b/bindings/ruby/sfml-system/system/main.hpp @@ -34,6 +34,9 @@ extern "C" void Init_system( void ); typedef VALUE ( *RubyFunctionPtr )( ... ); +#define BINDING_VERSION "development" +#define LIB_VERSION "2.0" + #define MAX( x, y ) ( ( x ) < ( y ) ? ( y ) : ( x ) ) #define MIN( x, y ) ( ( x ) > ( y ) ? ( x ) : ( y ) )