Changeset 5514:c35fedd1cdf7 in roaraudio


Ignore:
Timestamp:
05/29/12 00:43:21 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

allow fn to be -1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/roardl.c

    r5512 r5514  
    6969 
    7070// TODO: this should be removed on next SONAME change. 
    71 static struct roar_dl_lhandle * __currently_inited = NULL; 
     71static struct roar_dl_lhandle * __currently_inited    = NULL; 
     72static int                      __currently_inited_fn = -1; 
    7273 
    7374struct roar_dl_librarypara * roar_dl_para_new(const char * args, void * binargv, 
     
    538539                                         struct roar_dl_librarypara * para) { 
    539540 struct roar_dl_lhandle * old_init; 
     541 int old_fn; 
    540542#define _SUFFIX "_roaraudio_library_init" 
    541543 char name[80] = _SUFFIX; 
     
    638640 
    639641 old_init = __currently_inited; 
     642 old_fn   = __currently_inited_fn; 
    640643 __currently_inited = lhandle; 
    641644 for (i = 0; i < ROAR_DL_FN_MAX; i++) { 
     645  __currently_inited_fn = i; 
    642646  if ( lib->func[i] != NULL ) 
    643647   lib->func[i](para, lib); 
    644648 } 
     649 __currently_inited_fn = old_fn; 
    645650 __currently_inited = old_init; 
    646651 
     
    926931  lhandle = __currently_inited; 
    927932 
     933 if ( fn == -1 ) 
     934  fn = __currently_inited_fn; 
     935 
    928936 if ( lhandle == NULL ) { 
    929937  roar_err_set(ROAR_ERROR_FAULT); 
Note: See TracChangeset for help on using the changeset viewer.