]> git.sesse.net Git - vlc/blob - test/pyunit.h
3fc59785502a410bfc9eda364a4305c5f28e0728
[vlc] / test / pyunit.h
1 #include <Python.h>
2
3 #define ASSERT( a, message ) if( !(a) ) { fprintf( stderr, "ASSERTION FAILED\n" ); PyErr_SetString( PyExc_AssertionError, message ); return NULL; }
4
5 #define DECLARE_MODULE( module ) PyMODINIT_FUNC init##module( void ) {  \
6         Py_InitModule( #module, module##_methods );                     \
7 }
8
9 #define DEF_METHOD( method, desc ) { #method, method, METH_VARARGS, desc},