Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore


Modified Files:
        Ecore_Data.h ecore_path.c 


Log Message:
Cleanup ecore_path_group_new() and update ecore_path_group_available() API.

===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore/Ecore_Data.h,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -r1.51 -r1.52
--- Ecore_Data.h        6 Nov 2007 16:58:12 -0000       1.51
+++ Ecore_Data.h        11 Nov 2007 17:08:20 -0000      1.52
@@ -320,7 +320,7 @@
    /*
     * 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;
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore/ecore_path.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- ecore_path.c        6 Nov 2007 16:58:12 -0000       1.24
+++ ecore_path.c        11 Nov 2007 17:08:20 -0000      1.25
@@ -16,18 +16,13 @@
 /**
  * Creates a new path 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
  */
 EAPI Ecore_Path_Group *
 ecore_path_group_new(void)
 {
-   Ecore_Path_Group *group;
-   
-   group = (Ecore_Path_Group *)malloc(sizeof(Ecore_Path_Group));
-   memset(group, 0, sizeof(Ecore_Path_Group));
-
-   return group;
+   return calloc(1, sizeof(Ecore_Path_Group));
 }
 
 /**
@@ -148,15 +143,14 @@
  * @ingroup Ecore_Path_Group
  */
 EAPI Ecore_List *
-ecore_path_group_available(int group_id)
+ecore_path_group_available(Ecore_Path_Group *group)
 {
    Ecore_List *avail = NULL;
-   Ecore_Path_Group *group = NULL;
    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;
 
    ecore_list_first_goto(group->paths);



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to