You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
396 B
9 lines
396 B
#include <Python.h>
|
|
|
|
#define ASSERT( a, message ) if( !(a) ) { fprintf( stderr, "ASSERTION FAILED\n" ); PyErr_SetString( PyExc_AssertionError, message ); return NULL; }
|
|
|
|
#define DECLARE_MODULE( module ) PyMODINIT_FUNC init##module( void ) { \
|
|
Py_InitModule( #module, module##_methods ); \
|
|
}
|
|
|
|
#define DEF_METHOD( method, desc ) { #method, method, METH_VARARGS, desc},
|
|
|