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:
parent
550289b6a8
commit
f1cae1cfef
3 changed files with 22 additions and 23 deletions
|
@ -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. */
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
#include "ruby.h"
|
||||
|
||||
VALUE RetrieveSFMLClass( const char * aName );
|
||||
|
||||
// Ruby initiation function
|
||||
extern "C" void Init_system( void );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue