From 66fcdd5403ba20a9f9f760c545fe49a297188f96 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Mar 2007 20:27:58 +0400 Subject: Change find_type family to accept const TYPELIB*. include/mysql_h.ic: Change find_type family to accept const TYPELIB*. This sort of change can not break the ABI. --- include/mysql_h.ic | 2 +- include/typelib.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/mysql_h.ic b/include/mysql_h.ic index 44c51b34c1d..7d16a886fd8 100644 --- a/include/mysql_h.ic +++ b/include/mysql_h.ic @@ -638,7 +638,7 @@ extern TYPELIB * copy_typelib(MEM_ROOT * root, TYPELIB * from); # 415 "mysql_com.h" extern void create_random_string(char * to, unsigned int, struct rand_struct * rand_st); # 30 "typelib.h" -extern int find_type(char * x, TYPELIB * typelib, unsigned int); +extern int find_type(char * x, const TYPELIB * typelib, unsigned int); # 429 "mysql_com.h" extern void get_salt_from_password(unsigned char * res, char const * password); # 422 "mysql_com.h" diff --git a/include/typelib.h b/include/typelib.h index 75d170e59d3..79d3acd2d64 100644 --- a/include/typelib.h +++ b/include/typelib.h @@ -26,7 +26,8 @@ typedef struct st_typelib { /* Different types saved here */ unsigned int *type_lengths; } TYPELIB; -extern int find_type(char *x,TYPELIB *typelib,unsigned int full_name); +extern int find_type(const char *x, const TYPELIB *typelib, + unsigned int full_name); extern void make_type(char *to,unsigned int nr,TYPELIB *typelib); extern const char *get_type(TYPELIB *typelib,unsigned int nr); extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from); -- cgit v1.2.1 From 587942a792f5c31d0c5fc900dcacb454a0000e13 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Mar 2007 21:57:33 +0400 Subject: Fix warnings. include/typelib.h: Fix a compile warning. char *x is actually updated if it's found in the typelib (a peculiar way to return canonical value in case of a partial match) mysys/typelib.c: Fix a warning. sql/item_func.cc: Fix a compile-time warning. --- include/typelib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/typelib.h b/include/typelib.h index 79d3acd2d64..e04ec20f2bc 100644 --- a/include/typelib.h +++ b/include/typelib.h @@ -26,7 +26,7 @@ typedef struct st_typelib { /* Different types saved here */ unsigned int *type_lengths; } TYPELIB; -extern int find_type(const char *x, const TYPELIB *typelib, +extern int find_type(char *x, const TYPELIB *typelib, unsigned int full_name); extern void make_type(char *to,unsigned int nr,TYPELIB *typelib); extern const char *get_type(TYPELIB *typelib,unsigned int nr); -- cgit v1.2.1