libalpm
Arch Linux Package Manager Library
graph.c
Go to the documentation of this file.
00001 /*
00002  *  graph.c - helpful graph structure and setup/teardown methods
00003  *
00004  *  Copyright (c) 2007-2011 Pacman Development Team <pacman-dev@archlinux.org>
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
00018  */
00019 
00020 #include "graph.h"
00021 #include "util.h"
00022 #include "log.h"
00023 
00024 alpm_graph_t *_alpm_graph_new(void)
00025 {
00026     alpm_graph_t *graph = NULL;
00027 
00028     CALLOC(graph, 1, sizeof(alpm_graph_t), return NULL);
00029     return graph;
00030 }
00031 
00032 void _alpm_graph_free(void *data)
00033 {
00034     alpm_graph_t *graph = data;
00035     alpm_list_free(graph->children);
00036     free(graph);
00037 }
00038 
00039 /* vim: set ts=2 sw=2 noet: */