mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
minor plugin api fixes:
remove #define __attribute__(A) from plugin.h increase API version because placeholders were added more robust definition of min_plugin_interface_version include/mysql/plugin.h: move #define __attribute__(A) out of plugin.h (not part of the API) increase API version because placeholders were added plugin/fulltext/plugin_example.c: compilation failure on non-GCC compilers sql/sql_plugin.cc: more robust definition of min_plugin_interface_version it should work even when we forget to update it
This commit is contained in:
@ -21,7 +21,7 @@
|
||||
Plugin API. Common for all plugin types.
|
||||
*/
|
||||
|
||||
#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0001
|
||||
#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0002
|
||||
|
||||
/*
|
||||
The allowable types of plugins
|
||||
@ -31,10 +31,6 @@
|
||||
#define MYSQL_FTPARSER_PLUGIN 2 /* Full-text parser plugin */
|
||||
#define MYSQL_MAX_PLUGIN_TYPE_NUM 3 /* The number of plugin types */
|
||||
|
||||
#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__) || __GNUC__ == 2 && __GNUC_MINOR__ < 8)
|
||||
#define __attribute__(A)
|
||||
#endif
|
||||
|
||||
/*
|
||||
Macros for beginning and ending plugin declarations. Between
|
||||
mysql_declare_plugin and mysql_declare_plugin_end there should
|
||||
|
@ -17,6 +17,10 @@
|
||||
#include <ctype.h>
|
||||
#include <mysql/plugin.h>
|
||||
|
||||
#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__) || __GNUC__ == 2 && __GNUC_MINOR__ < 8)
|
||||
#define __attribute__(A)
|
||||
#endif
|
||||
|
||||
static long number_of_calls= 0; /* for SHOW STATUS, see below */
|
||||
|
||||
/*
|
||||
|
@ -40,7 +40,7 @@ static const char *plugin_interface_version_sym=
|
||||
static const char *sizeof_st_plugin_sym=
|
||||
"_mysql_sizeof_struct_st_plugin_";
|
||||
static const char *plugin_declarations_sym= "_mysql_plugin_declarations_";
|
||||
static int min_plugin_interface_version= 0x0000;
|
||||
static int min_plugin_interface_version= MYSQL_PLUGIN_INTERFACE_VERSION & ~0xFF;
|
||||
/* Note that 'int version' must be the first field of every plugin
|
||||
sub-structure (plugin->info).
|
||||
*/
|
||||
|
Reference in New Issue
Block a user