diff options
author | Sergei Golubchik <sergii@pisem.net> | 2010-03-08 14:57:32 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2010-03-08 14:57:32 +0100 |
commit | f0cf48a0c450d5cb4f3bd4f89a3e0b2135403e56 (patch) | |
tree | a791f95385841ce6ec0f66f1cfa6533461715415 /sql/sql_plugin.h | |
parent | 81424b5bdaeb841a56519aa6994194c443b32478 (diff) | |
download | mariadb-git-f0cf48a0c450d5cb4f3bd4f89a3e0b2135403e56.tar.gz |
small code cleanup - "good ifdef is no ifdef"
Diffstat (limited to 'sql/sql_plugin.h')
-rw-r--r-- | sql/sql_plugin.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_plugin.h b/sql/sql_plugin.h index 004d0d5abb7..54ef38b3734 100644 --- a/sql/sql_plugin.h +++ b/sql/sql_plugin.h @@ -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); |