12
12
You should have received a copy of the GNU General Public License
13
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
19
#include "drizzled/sql_list.h"
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
17
#include <drizzled/server_includes.h>
24
19
list_node end_of_list;
26
} /* namespace drizzled */
21
void free_list(I_List <i_string_pair> *list)
24
while ((tmp= list->get()))
29
void free_list(I_List <i_string> *list)
32
while ((tmp= list->get()))
37
base_list::base_list(const base_list &rhs, MEM_ROOT *mem_root)
42
It's okay to allocate an array of nodes at once: we never
43
call a destructor for list_node objects anyway.
45
first= (list_node*) alloc_root(mem_root,
46
sizeof(list_node) * rhs.elements);
49
elements= rhs.elements;
50
list_node *dst= first;
51
list_node *src= rhs.first;
52
for (; dst < first + elements - 1; dst++, src= src->next)
57
/* Copy the last node */
59
dst->next= &end_of_list;
60
/* Setup 'last' member */