Drop register function

Do not forget to bump ZATHURA_ABI_VERSION before the next release.
This commit is contained in:
Sebastian Ramacher 2018-02-03 14:27:29 +01:00
parent 53abbdf250
commit cb887221e1
2 changed files with 0 additions and 13 deletions

View file

@ -194,13 +194,6 @@ struct zathura_plugin_functions_s
zathura_plugin_page_get_label_t page_get_label;
};
/**
* Functions register function
*
* @param functions The functions struct
*/
typedef void (*zathura_plugin_register_function_t)(zathura_plugin_functions_t* functions);
typedef struct zathura_plugin_version_s {
unsigned int major; /**< Major */
unsigned int minor; /**< Minor */
@ -210,7 +203,6 @@ typedef struct zathura_plugin_version_s {
typedef struct zathura_plugin_definition_s {
const char* name;
const zathura_plugin_version_t version;
const zathura_plugin_register_function_t register_function;
zathura_plugin_functions_t functions;
const size_t mime_types_size;
const char** mime_types;
@ -259,7 +251,6 @@ typedef struct zathura_plugin_definition_s {
const zathura_plugin_definition_t ZATHURA_PLUGIN_DEFINITION_SYMBOL = { \
.name = plugin_name, \
.version = { major, minor, rev }, \
.register_function = NULL, \
.functions = plugin_functions, \
.mime_types_size = sizeof(zathura_plugin_mime_types) / sizeof(zathura_plugin_mime_types[0]), \
.mime_types = zathura_plugin_mime_types \

View file

@ -180,10 +180,6 @@ zathura_plugin_manager_load(zathura_plugin_manager_t* plugin_manager)
for (size_t s = 0; s != plugin_definition->mime_types_size; ++s) {
zathura_plugin_add_mimetype(plugin, plugin_definition->mime_types[s]);
}
// register functions
if (plugin->definition->register_function != NULL) {
plugin->definition->register_function(&(plugin->functions));
}
bool ret = register_plugin(plugin_manager, plugin);
if (ret == false) {