Changeset 5353:de96f27919bf in roaraudio for include


Ignore:
Timestamp:
12/12/11 19:11:39 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

serveral updates to roarpluginrunner and plugin API in general

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/roardl.h

    r5347 r5353  
    102102// general stuff: 
    103103#define ROAR_DL_PLUGIN_ABORT_LOADING(err) roar_err_set((err)); return NULL 
    104 #define ROAR_DL_PLUGIN_CHECK_VERSIONS(app,abi) if ( roar_dl_para_check_version(para, (app), (abi)) == -1 ) return NULL 
     104#define ROAR_DL_PLUGIN_CHECK_VERSIONS(app,abi) ((lib.host_appname = (app))    != NULL || \ 
     105                                                (lib.host_abiversion = (abi)) != NULL ) 
     106// should we keep this macro at all? Is it helpfull at all? 
     107// if a plugin can handle multiple hosts it needs to call roar_dl_para_check_version() itself anyway. 
     108#define ROAR_DL_PLUGIN_CHECK_VERSIONS_NOW(app,abi) if ( roar_dl_para_check_version(para, (app), (abi)) == -1 ) return NULL 
    105109 
    106110// register stuff: 
     
    111115                                                 lib.global_data_init = &(init);       \ 
    112116                                                 lib.global_data_pointer = (void*)&(ptr) 
    113 #define ROAR_DL_PLUGIN_REG_LIBDEP(deps) (((lib.libdep = deps) == NULL) ? \ 
     117#define ROAR_DL_PLUGIN_REG_LIBDEP(deps) (((lib.libdep = (deps)) == NULL) ? \ 
    114118                                           (ssize_t)-1 : \ 
    115                                            (ssize_t)(lib.libdep_len = sizeof(deps)/sizeof(struct roar_dl_librarydep))) 
     119                                           (ssize_t)(lib.libdep_len = sizeof((deps))/sizeof(struct roar_dl_librarydep))) 
    116120 
    117121// meta data stuff: 
     
    223227 size_t libdep_len; 
    224228 struct roar_dl_appsched * appsched; 
     229 const char * host_appname; 
     230 const char * host_abiversion; 
    225231}; 
    226232 
Note: See TracChangeset for help on using the changeset viewer.