Cleanup ecore_path_group_new() and update ecore_path_group_available() API.

SVN revision: 32577
This commit is contained in:
Gustavo Sverzut Barbieri 2007-11-11 17:08:20 +00:00
parent 6c22f4068d
commit 78840e0091
2 changed files with 6 additions and 12 deletions

View File

@ -320,7 +320,7 @@ extern "C" {
/* /*
* Get a list of all the available files in a path set * Get a list of all the available files in a path set
*/ */
EAPI Ecore_List * ecore_path_group_available(int group_id); EAPI Ecore_List * ecore_path_group_available(Ecore_Path_Group *group);
typedef struct _ecore_plugin Ecore_Plugin; typedef struct _ecore_plugin Ecore_Plugin;

View File

@ -16,18 +16,13 @@
/** /**
* Creates a new path group. * Creates a new path group.
* @param group_name The name of the new group. * @param group_name The name of the new group.
* @return @c 0 on error, the integer id of the new group on success. * @return @c NULL on error, the handle of the new group on success.
* @ingroup Ecore_Path_Group * @ingroup Ecore_Path_Group
*/ */
EAPI Ecore_Path_Group * EAPI Ecore_Path_Group *
ecore_path_group_new(void) ecore_path_group_new(void)
{ {
Ecore_Path_Group *group; return calloc(1, sizeof(Ecore_Path_Group));
group = (Ecore_Path_Group *)malloc(sizeof(Ecore_Path_Group));
memset(group, 0, sizeof(Ecore_Path_Group));
return group;
} }
/** /**
@ -148,15 +143,14 @@ ecore_path_group_find(Ecore_Path_Group *group, const char *name)
* @ingroup Ecore_Path_Group * @ingroup Ecore_Path_Group
*/ */
EAPI Ecore_List * EAPI Ecore_List *
ecore_path_group_available(int group_id) ecore_path_group_available(Ecore_Path_Group *group)
{ {
Ecore_List *avail = NULL; Ecore_List *avail = NULL;
Ecore_Path_Group *group = NULL;
char *path; char *path;
//group = __ecore_path_group_find_id(group_id); CHECK_PARAM_POINTER_RETURN("group", group, NULL);
if (!group || !group->paths || ecore_list_empty_is(group->paths)) if (!group->paths || ecore_list_empty_is(group->paths))
return NULL; return NULL;
ecore_list_first_goto(group->paths); ecore_list_first_goto(group->paths);