]> git.sesse.net Git - vlc/blob - test/native/threads.c
Support for UDP-Lite (with full checksum coverage only atm)
[vlc] / test / native / threads.c
1 #include "../pyunit.h"
2 #include <vlc/vlc.h>
3
4 PyObject *threadvar_test( PyObject *self, PyObject *args )
5 {
6     void *p_foo = malloc(1);
7     vlc_threadvar_t key, key2;
8
9     vlc_threadvar_create( NULL, &key );
10     vlc_threadvar_set( &key, p_foo );
11     ASSERT( vlc_threadvar_get( &key ) == p_foo, "key does not match" );
12
13     vlc_threadvar_create( NULL, &key2 );
14     vlc_threadvar_set( &key2, NULL );
15     ASSERT( vlc_threadvar_get( &key2 ) == NULL, "key2 does not match" );
16     
17     Py_INCREF( Py_None );
18     return Py_None;
19 }