mirror of
https://code.videolan.org/videolan/vlc
synced 2024-10-11 06:21:30 +02:00
20 lines
520 B
C
20 lines
520 B
C
#include "../pyunit.h"
|
|
#include <vlc/vlc.h>
|
|
|
|
PyObject *threadvar_test( PyObject *self, PyObject *args )
|
|
{
|
|
void *p_foo = malloc(1);
|
|
vlc_threadvar_t key, key2;
|
|
|
|
vlc_threadvar_create( NULL, &key );
|
|
vlc_threadvar_set( &key, p_foo );
|
|
ASSERT( vlc_threadvar_get( &key ) == p_foo, "key does not match" );
|
|
|
|
vlc_threadvar_create( NULL, &key2 );
|
|
vlc_threadvar_set( &key2, NULL );
|
|
ASSERT( vlc_threadvar_get( &key2 ) == NULL, "key2 does not match" );
|
|
|
|
Py_INCREF( Py_None );
|
|
return Py_None;
|
|
}
|