* objects.c: vlc_object_t handling
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: objects.c,v 1.1 2002/06/01 12:32:01 sam Exp $
+ * $Id: objects.c,v 1.3 2002/06/01 18:04:49 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
psz_thread[0] = '\0';
if( p_this->b_thread )
{
- snprintf( psz_thread, 20, " (thread %d)", p_this->thread_id );
+ snprintf( psz_thread, 20, " (thread %d)", p_this->i_thread );
psz_thread[19] = '\0';
}
psz_foo[i_level] = '\0';
- msg_Dbg( p_this, "%so %s %p%s%s%s%s", psz_foo, p_this->psz_object_type,
- p_this, psz_name, psz_thread, psz_refcount, psz_children );
+ msg_Info( p_this, "%so %s %p%s%s%s%s", psz_foo, p_this->psz_object_type,
+ p_this, psz_name, psz_thread, psz_refcount, psz_children );
psz_foo[i_level] = i_back;
if( i_level / 2 >= MAX_TREE_DEPTH )
}
}
-/* vlc_object_create: initialize a vlc object and set its parent */
+/* vlc_object_create: initialize a vlc object */
void * __vlc_object_create( vlc_object_t *p_this, int i_type )
{
vlc_object_t * p_new;
psz_type = "audio output";
break;
default:
- i_size = i_type;
+ i_size = i_type > sizeof(vlc_object_t)
+ ? i_type : sizeof(vlc_object_t);
i_type = VLC_OBJECT_PRIVATE;
psz_type = "private";
break;
p_new->b_die = 0;
p_new->b_error = 0;
- p_new->p_this = p_new;
-
/* If i_type is root, then p_new is our own p_vlc */
if( i_type == VLC_OBJECT_ROOT )
{