Changeset 38276a4632c98f6e98186adbb1a1538168e1a697
- 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
| r449fd28 |
r38276a4 |
|
| 37 | 37 | |
|---|
| 38 | 38 | /* Object types */ |
|---|
| 39 | | #define VLC_OBJECT_GLOBAL (-1) |
|---|
| | 39 | |
|---|
| 40 | 40 | #define VLC_OBJECT_LIBVLC (-2) |
|---|
| 41 | 41 | #define VLC_OBJECT_MODULE (-3) |
|---|
| r0e1b522 |
r38276a4 |
|
| 108 | 108 | const char *psz_name; |
|---|
| 109 | 109 | } pp_objects[] = |
|---|
| 110 | | { { VLC_OBJECT_GLOBAL, "global" }, |
|---|
| 111 | | { VLC_OBJECT_LIBVLC, "libvlc" }, |
|---|
| | 110 | { { VLC_OBJECT_LIBVLC, "libvlc" }, |
|---|
| 112 | 111 | { VLC_OBJECT_MODULE, "module" }, |
|---|
| 113 | 112 | { VLC_OBJECT_INTF, "intf" }, |
|---|
| r6da90a1 |
r38276a4 |
|
| 144 | 144 | |
|---|
| 145 | 145 | 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 */ |
|---|
| 149 | 149 | p_libvlc_global = (libvlc_global_data_t *)p_new; |
|---|
| 150 | 150 | p_new->p_libvlc = NULL; |
|---|
| … | … | |
| 380 | 380 | free( p_this->psz_header ); |
|---|
| 381 | 381 | |
|---|
| 382 | | if( p_this->i_object_type == VLC_OBJECT_GLOBAL ) |
|---|
| | 382 | if( p_this->p_libvlc == NULL ) |
|---|
| 383 | 383 | { |
|---|
| 384 | 384 | libvlc_global_data_t *p_global = (libvlc_global_data_t *)p_this; |
|---|
| 385 | 385 | |
|---|
| | 386 | #ifndef NDEBUG |
|---|
| | 387 | assert( p_global == vlc_global() ); |
|---|
| 386 | 388 | /* Test for leaks */ |
|---|
| 387 | 389 | if( p_global->i_objects > 0 ) |
|---|
| … | … | |
| 409 | 411 | abort(); |
|---|
| 410 | 412 | } |
|---|
| | 413 | #endif |
|---|
| 411 | 414 | |
|---|
| 412 | 415 | /* We are the global object ... no need to lock. */ |
|---|
| rb9c8ba9 |
r38276a4 |
|
| 144 | 144 | { |
|---|
| 145 | 145 | p_root = vlc_custom_create( NULL, sizeof( *p_root ), |
|---|
| 146 | | VLC_OBJECT_GLOBAL, "global" ); |
|---|
| | 146 | VLC_OBJECT_GENERIC, "root" ); |
|---|
| 147 | 147 | if( p_root == NULL ) |
|---|
| 148 | 148 | { |
|---|