* Copyright (C) 1998-2004 the VideoLAN team
* $Id$
*
- * Authors: Olivier Aubert <oaubert at bat710.univ-lyon1.fr>
+ * Authors: Olivier Aubert <olivier.aubert at liris.cnrs.fr>
* Clément Stenac <zorglub@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
#define PY_SSIZE_T_MIN INT_MIN
#endif
-#define SELF ((MediaControl*)self)
/**********************************************************************
* Exceptions handling
libvlc_instance_t* p_instance;
} vlcInstance;
-#define LIBVLC_INSTANCE ((vlcInstance*)self)
-
/**********************************************************************
* MediaControl Object
**********************************************************************/
staticforward PyTypeObject vlcMediaPlayer_Type;
staticforward PyTypeObject vlcMedia_Type;
-#define LIBVLC_INSTANCE ((vlcInstance*)self)
-#define LIBVLC_MEDIAPLAYER ((vlcMediaPlayer*)self)
-#define LIBVLC_MEDIA ((vlcMedia*)self)
+#define LIBVLC_INSTANCE(self) (((vlcInstance*)self)->p_instance)
+#define LIBVLC_MEDIAPLAYER(self) (((vlcMediaPlayer*)self)->p_mp)
+#define LIBVLC_MEDIA(self) (((vlcMedia*)self)->p_media)
+#define LIBVLC_MC(self) (((MediaControl*)self)->mc)
#define LIBVLC_TRY libvlc_exception_init( &ex );
#define LIBVLC_EXCEPT if( libvlc_exception_raised( &ex ) ) { \
PyObject *py_exc = vlc_Exception; \
- PyErr_SetString( py_exc, libvlc_exception_get_message( &ex ) ); \
+ PyErr_SetString( py_exc, libvlc_errmsg() ); \
return NULL; \
}