Commit 8d3912c2 authored by Olivier Aubert's avatar Olivier Aubert

python bindings: use new mediacontrol_exception_create function

parent a79c62a4
......@@ -46,10 +46,10 @@ typedef int Py_ssize_t;
* Exceptions handling
**********************************************************************/
#define MC_TRY exception=mediacontrol_exception_init(exception)
#define MC_TRY exception=mediacontrol_exception_create( )
#define MC_EXCEPT \
if( exception->code ) { \
if( exception && exception->code ) { \
PyObject *py_exc = MediaControl_InternalException; \
switch( exception->code ) { \
case mediacontrol_InternalException: \
......@@ -71,7 +71,7 @@ typedef int Py_ssize_t;
PyErr_SetString( py_exc, exception->message ); \
mediacontrol_exception_free( exception ); \
return NULL; \
} else { mediacontrol_exception_free( exception ); }
} else if( exception ) { mediacontrol_exception_free( exception ); }
PyObject *MediaControl_InternalException;
PyObject *MediaControl_PositionKeyNotSupported;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment