Bug #11748 mysql.h exports generally-named functions
Submitted: 5 Jul 2005 20:49 Modified: 5 Jul 2005 20:53
Reporter: Timothy Smith Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S4 (Feature request)
Version:all OS:Any (all)
Assigned to: CPU Architecture:Any
Triage: Triaged: D5 (Feature request)

[5 Jul 2005 20:49] Timothy Smith
Description:
The file include/my_list.h exports some names that are too generically named.  This can cause name clashes with application functions.

typedef struct st_list {
struct st_list *prev,*next;
void *data;
} LIST;

extern LIST *list_add(LIST *root,LIST *element);
extern LIST *list_delete(LIST *root,LIST *element);
extern LIST *list_cons(void *data,LIST *root);
extern LIST *list_reverse(LIST *root);
extern void list_free(LIST *root,unsigned int free_data);
extern unsigned int list_length(LIST *);
extern int list_walk(LIST *,list_walk_action action,gptr argument);

It would be good to rename these to:

extern MY_LIST *my_list_add(MY_LIST *root, MY_LIST *element);
/* Similar for other list_* functions */

How to repeat:

n/a

Suggested fix:

See Description.