small syntactic changes

This commit is contained in:
Linus Dierheimer
2021-05-12 20:13:56 +02:00
parent 1ece13c36f
commit 7afc27e52f
6 changed files with 16 additions and 36 deletions
+4 -7
View File
@@ -14,19 +14,16 @@ typedef void* DynamicLibrary;
return FF_VARIANT_NULL; \
}
#define FF_LIBRARY_LOAD_SYMBOL(library, symbolName, mutex) dlsym(library, symbolName); \
if(dlerror() != NULL) { \
pthread_mutex_unlock(&mutex); \
dlclose(library); \
return FF_VARIANT_NULL; \
}
#define FF_LIBRARY_ERROR_RETURN(library, mutex) { \
pthread_mutex_unlock(&mutex); \
dlclose(library); \
return FF_VARIANT_NULL; \
}
#define FF_LIBRARY_LOAD_SYMBOL(library, symbolName, mutex) dlsym(library, symbolName); \
if(dlerror() != NULL) \
FF_LIBRARY_ERROR_RETURN(library, mutex)
typedef struct GVariantGetters
{
const gchar*(*ffg_variant_get_string)(GVariant*, gsize*);