1
mirror of https://code.videolan.org/videolan/vlc synced 2024-10-11 06:21:30 +02:00
vlc/test/native/threads.c

20 lines
520 B
C
Raw Normal View History

#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" );
2007-09-10 20:56:52 +02:00
Py_INCREF( Py_None );
return Py_None;
}