Changeset 3300:6ab4977e3043 in roaraudio for libroar/roardl.c


Ignore:
Timestamp:
02/02/10 23:01:39 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

load plugins, write plugin macro

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/roardl.c

    r3298 r3300  
    8181 struct roar_dl_libraryinst * (*func)(struct roar_dl_librarypara * para); 
    8282 struct roar_dl_libraryinst * lib; 
     83 struct roar_dl_librarypara * para = NULL; 
     84 int i; 
    8385 
    8486 if ( (void*)lhandle < (void*)128 && prefix == NULL ) 
     
    9597  return -1; 
    9698 
    97  lib = func(NULL); 
     99 lib = func(para); 
    98100 
    99101 if ( lib == NULL ) 
    100102  return -1; 
     103 
     104 if ( lib->version != ROAR_DL_LIBINST_VERSION ) 
     105  return -1; 
     106 
     107 if ( sizeof(struct roar_dl_libraryinst) > lib->len ) 
     108  return -1; 
     109 
     110 for (i = 0; i < ROAR_DL_FN_MAX; i++) { 
     111  if ( lib->func[i] != NULL ) 
     112   lib->func[i](para, lib); 
     113 } 
    101114 
    102115 // do something with lib here. 
Note: See TracChangeset for help on using the changeset viewer.