- update to constant.c

- give it the key/items interface
  - creates some factory functions for const generation
- genutils methods
  - method for getting module constants
  - method for throwing errors with a print string
- updates to function names
- clean up interpreter launch a bit
This commit is contained in:
2005-08-17 14:26:00 +00:00
parent 2872263377
commit 8b060dd5ad
16 changed files with 435 additions and 361 deletions

View File

@@ -366,11 +366,11 @@ static PyObject *M_Material_Get( PyObject * self, PyObject * args )
static PyObject *Material_ModesDict( void )
{
PyObject *Modes = M_constant_New( );
PyObject *Modes = PyConstant_New( );
#undef EXPP_ADDCONST
#define EXPP_ADDCONST(name) \
constant_insert(c, #name, PyInt_FromLong(EXPP_MAT_MODE_##name))
PyConstant_Insert(c, #name, PyInt_FromLong(EXPP_MAT_MODE_##name))
/* So that:
* EXPP_ADDCONST(TRACEABLE) becomes:
@@ -414,11 +414,11 @@ static PyObject *Material_ModesDict( void )
static PyObject *Material_ShadersDict( void )
{
PyObject *Shaders = M_constant_New( );
PyObject *Shaders = PyConstant_New( );
#undef EXPP_ADDCONST
#define EXPP_ADDCONST(name) \
constant_insert(c, #name, PyInt_FromLong(EXPP_MAT_SHADER_##name))
PyConstant_Insert(c, #name, PyInt_FromLong(EXPP_MAT_SHADER_##name))
/* So that:
* EXPP_ADDCONST(DIFFUSE_LAMBERT) becomes: