~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/list.cc

  • Committer: Monty Taylor
  • Date: 2009-01-29 19:04:39 UTC
  • mto: (779.3.29 devel)
  • mto: This revision was merged to the branch mainline in revision 823.
  • Revision ID: mordred@inaugust.com-20090129190439-vfr95s6gaudjacm7
Add timegm which is missing on Solaris.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
*/
19
19
 
20
20
#include "mysys_priv.h"
21
 
#include <my_list.h>
 
21
#include "my_list.h"
 
22
 
 
23
#include <stdlib.h>
22
24
 
23
25
 
24
26
 
52
54
}
53
55
 
54
56
 
55
 
void list_free(LIST *root, uint free_data)
 
57
void list_free(LIST *root, uint32_t free_data)
56
58
{
57
59
  LIST *next;
58
60
  while (root)
59
61
  {
60
62
    next=root->next;
61
63
    if (free_data)
62
 
      my_free((uchar*) root->data,MYF(0));
63
 
    my_free((uchar*) root,MYF(0));
 
64
      free((unsigned char*) root->data);
 
65
    free((unsigned char*) root);
64
66
    root=next;
65
67
  }
66
68
}
68
70
 
69
71
LIST *list_cons(void *data, LIST *list)
70
72
{
71
 
  LIST * const new_charset=(LIST*) my_malloc(sizeof(LIST),MYF(MY_FAE));
 
73
  LIST * const new_charset=(LIST*) malloc(sizeof(LIST));
72
74
  if (!new_charset)
73
75
    return NULL;
74
76
  new_charset->data=data;
91
93
  return last;
92
94
}
93
95
 
94
 
int list_walk(LIST *list, list_walk_action action, uchar* argument)
 
96
int list_walk(LIST *list, list_walk_action action, unsigned char* argument)
95
97
{
96
98
  while (list)
97
99
  {