Changeset 38276a4632c98f6e98186adbb1a1538168e1a697

Show
Ignore:
Timestamp:
05/04/08 18:16:06 (2 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1209917766 +0300
git-parent:

[bf52311992e0411a26fec5ae19d254308e122058]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1209917760 +0300
Message:

Remove VLC_OBJECT_GLOBAL

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc_objects.h

    r449fd28 r38276a4  
    3737 
    3838/* Object types */ 
    39 #define VLC_OBJECT_GLOBAL      (-1) 
     39 
    4040#define VLC_OBJECT_LIBVLC      (-2) 
    4141#define VLC_OBJECT_MODULE      (-3) 
  • modules/misc/lua/objects.c

    r0e1b522 r38276a4  
    108108        const char *psz_name; 
    109109    } pp_objects[] = 
    110         { { VLC_OBJECT_GLOBAL, "global" }, 
    111           { VLC_OBJECT_LIBVLC, "libvlc" }, 
     110        { { VLC_OBJECT_LIBVLC, "libvlc" }, 
    112111          { VLC_OBJECT_MODULE, "module" }, 
    113112          { VLC_OBJECT_INTF, "intf" }, 
  • src/misc/objects.c

    r6da90a1 r38276a4  
    144144 
    145145    libvlc_global_data_t *p_libvlc_global; 
    146     if( i_type == VLC_OBJECT_GLOBAL ) 
    147     { 
    148         /* If i_type is global, then p_new is actually p_libvlc_global */ 
     146    if( p_this == NULL ) 
     147    { 
     148        /* Only the global root object is created out of the blue */ 
    149149        p_libvlc_global = (libvlc_global_data_t *)p_new; 
    150150        p_new->p_libvlc = NULL; 
     
    380380    free( p_this->psz_header ); 
    381381 
    382     if( p_this->i_object_type == VLC_OBJECT_GLOBAL ) 
     382    if( p_this->p_libvlc == NULL ) 
    383383    { 
    384384        libvlc_global_data_t *p_global = (libvlc_global_data_t *)p_this; 
    385385 
     386#ifndef NDEBUG 
     387        assert( p_global == vlc_global() ); 
    386388        /* Test for leaks */ 
    387389        if( p_global->i_objects > 0 ) 
     
    409411            abort(); 
    410412        } 
     413#endif 
    411414 
    412415        /* We are the global object ... no need to lock. */ 
  • src/misc/threads.c

    rb9c8ba9 r38276a4  
    144144    { 
    145145        p_root = vlc_custom_create( NULL, sizeof( *p_root ), 
    146                                     VLC_OBJECT_GLOBAL, "global" ); 
     146                                    VLC_OBJECT_GENERIC, "root" ); 
    147147        if( p_root == NULL ) 
    148148        {