mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
small code cleanup - "good ifdef is no ifdef"
This commit is contained in:
@@ -89,6 +89,8 @@ struct st_plugin_int
|
||||
*/
|
||||
#ifdef DBUG_OFF
|
||||
typedef struct st_plugin_int *plugin_ref;
|
||||
#define plugin_ref_to_int(A) A
|
||||
#define plugin_int_to_ref(A) A
|
||||
#define plugin_decl(pi) ((pi)->plugin)
|
||||
#define plugin_dlib(pi) ((pi)->plugin_dl)
|
||||
#define plugin_data(pi,cast) ((cast)((pi)->data))
|
||||
@@ -97,6 +99,8 @@ typedef struct st_plugin_int *plugin_ref;
|
||||
#define plugin_equals(p1,p2) ((p1) == (p2))
|
||||
#else
|
||||
typedef struct st_plugin_int **plugin_ref;
|
||||
#define plugin_ref_to_int(A) (A ? A[0] : NULL)
|
||||
#define plugin_int_to_ref(A) &(A)
|
||||
#define plugin_decl(pi) ((pi)[0]->plugin)
|
||||
#define plugin_dlib(pi) ((pi)[0]->plugin_dl)
|
||||
#define plugin_data(pi,cast) ((cast)((pi)[0]->data))
|
||||
@@ -120,7 +124,7 @@ extern bool plugin_is_ready(const LEX_STRING *name, int type);
|
||||
#define my_plugin_lock_by_name_ci(A,B,C) plugin_lock_by_name(A,B,C ORIG_CALLER_INFO)
|
||||
#define my_plugin_lock(A,B) plugin_lock(A,B CALLER_INFO)
|
||||
#define my_plugin_lock_ci(A,B) plugin_lock(A,B ORIG_CALLER_INFO)
|
||||
extern plugin_ref plugin_lock(THD *thd, plugin_ref *ptr CALLER_INFO_PROTO);
|
||||
extern plugin_ref plugin_lock(THD *thd, plugin_ref ptr CALLER_INFO_PROTO);
|
||||
extern plugin_ref plugin_lock_by_name(THD *thd, const LEX_STRING *name,
|
||||
int type CALLER_INFO_PROTO);
|
||||
extern void plugin_unlock(THD *thd, plugin_ref plugin);
|
||||
|
Reference in New Issue
Block a user