summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6e8ab1f)
raw | patch | inline | side by side (parent: 6e8ab1f)
author | Sebastian Harl <sh@tokkee.org> | |
Tue, 1 Jul 2014 19:55:16 +0000 (21:55 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Tue, 1 Jul 2014 19:55:16 +0000 (21:55 +0200) |
src/core/plugin.c | patch | blob | history | |
src/include/core/plugin.h | patch | blob | history |
diff --git a/src/core/plugin.c b/src/core/plugin.c
index 36f80f6e6c29296322fac9979632a0e32ea05f29..f10a904169f5d3993dc89894535e6a7b4ca01513 100644 (file)
--- a/src/core/plugin.c
+++ b/src/core/plugin.c
#include <pthread.h>
+/* helper to access info attributes */
+#define INFO_GET(i, attr) \
+ ((i)->attr ? (i)->attr : #attr" not set")
+
/*
* private data types
*/
-struct sdb_plugin_info {
- char *plugin_name;
- char *filename;
-
- /* public attributes */
- char *description;
- char *copyright;
- char *license;
-
- int version;
- int plugin_version;
-};
-#define SDB_PLUGIN_INFO_INIT { \
- /* plugin_name */ NULL, /* filename */ NULL, /* desc */ NULL, \
- /* copyright */ NULL, /* license */ NULL, \
- /* version */ -1, /* plugin_version */ -1 }
-#define INFO_GET(i, attr) \
- ((i)->attr ? (i)->attr : #attr" not set")
-
typedef struct {
sdb_object_t super;
sdb_plugin_ctx_t public;
index 3d938807f61d2c1098dae31429157946b908b2f8..e6ea7573cf15a0514c939c754eed48ae16c10964 100644 (file)
} sdb_plugin_ctx_t;
#define SDB_PLUGIN_CTX_INIT { 0 }
-struct sdb_plugin_info;
-typedef struct sdb_plugin_info sdb_plugin_info_t;
+typedef struct {
+ char *plugin_name;
+ char *filename;
+
+ /* public attributes */
+ char *description;
+ char *copyright;
+ char *license;
+
+ int version;
+ int plugin_version;
+} sdb_plugin_info_t;
+#define SDB_PLUGIN_INFO_INIT { \
+ /* plugin_name */ NULL, /* filename */ NULL, /* desc */ NULL, \
+ /* copyright */ NULL, /* license */ NULL, \
+ /* version */ -1, /* plugin_version */ -1 }
/* this should be used in the header of a plugin to avoid
* missing prototype warnings/errors for the plugin init