Moved the RetrieveSFMLClass function to the system module since several other modules will be using this function too.

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1678 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
groogy 2010-11-19 13:33:37 +00:00
parent 550289b6a8
commit f1cae1cfef
3 changed files with 22 additions and 23 deletions

View file

@ -27,6 +27,17 @@
VALUE globalSFMLNamespace;
VALUE RetrieveSFMLClass( const char * aName )
{
ID name = rb_intern( aName );
if( rb_cvar_defined( globalSFMLNamespace, name ) == Qfalse )
{
rb_raise( rb_eRuntimeError, "This module depends on SFML::%s", aName );
}
return rb_cvar_get( globalSFMLNamespace, name );
}
void Init_system( void )
{
/* SFML namespace which contains the classes of this module. */

View file

@ -25,6 +25,8 @@
#include "ruby.h"
VALUE RetrieveSFMLClass( const char * aName );
// Ruby initiation function
extern "C" void Init_system( void );