Re: [E-devel] E SVN: englebass trunk/efreet/src/lib
i don't know if some API were added, but ifso, add @since 1.1 in the doxy doc Vincent On Thu, 18 Aug 2011, Enlightenment SVN wrote: Log: efreet: Add doc Author: englebass Date: 2011-08-18 23:44:27 -0700 (Thu, 18 Aug 2011) New Revision: 62579 Trac: http://trac.enlightenment.org/e/changeset/62579 Modified: trunk/efreet/src/lib/efreet_desktop.h trunk/efreet/src/lib/efreet_icon.h Modified: trunk/efreet/src/lib/efreet_desktop.h === --- trunk/efreet/src/lib/efreet_desktop.h 2011-08-19 06:44:16 UTC (rev 62578) +++ trunk/efreet/src/lib/efreet_desktop.h 2011-08-19 06:44:27 UTC (rev 62579) @@ -122,6 +122,11 @@ * * By using efreet_desktop_get the Efreet_Desktop will be saved in an internal * cache for quicker loading. + * + * Users of this command should listen to EFREET_EVENT_DESKTOP_CACHE_UPDATE + * event, if the application is to keep the reference. When the event fires + * the Efreet_Desktop struct should be invalidated and reloaded from a new + * cache file. */ EAPI Efreet_Desktop *efreet_desktop_get(const char *file); @@ -145,6 +150,11 @@ * on failure * @brief Gets a reference to an Efreet_Desktop structure representing the * contents of @a file or NULL if @a file is not a valid .desktop file. + * + * Users of this command should listen to EFREET_EVENT_DESKTOP_CACHE_UPDATE + * event, if the application is to keep the reference. When the event fires + * the Efreet_Desktop struct should be invalidated and reloaded from a new + * cache file. */ EAPI Efreet_Desktop *efreet_desktop_new(const char *file); Modified: trunk/efreet/src/lib/efreet_icon.h === --- trunk/efreet/src/lib/efreet_icon.h2011-08-19 06:44:16 UTC (rev 62578) +++ trunk/efreet/src/lib/efreet_icon.h2011-08-19 06:44:27 UTC (rev 62579) @@ -213,6 +213,9 @@ * the list. * @note This function will search the given theme for all icons before falling * back. This is useful when searching for mimetype icons. + * + * There is no guarantee for how long the pointer to the path will be valid. + * If the pointer is to be kept, the user must create a copy of the path. */ EAPI const char*efreet_icon_list_find(const char *theme_name, Eina_List *icons, @@ -224,6 +227,9 @@ * @param size; The icon size to look for * @return Returns the path to the given icon or NULL if none found * @brief Retrives the path to the given icon. + * + * There is no guarantee for how long the pointer to the path will be valid. + * If the pointer is to be kept, the user must create a copy of the path. */ EAPI const char*efreet_icon_path_find(const char *theme_name, const char *icon, -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ enlightenment-svn mailing list enlightenment-...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-svn -- EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: englebass trunk/efreet/src/lib
On Thu, Dec 9, 2010 at 2:15 PM, Enlightenment SVN no-re...@enlightenment.org wrote: Log: Reduce stack usage For functions often called, don't put unneded mem on stack That commit doesn't make anysense to me. tmp = alloca(PATH_MAX) is strictly the same as a char tmp[PATH_MAX]. And stack usage is only accounted when you use it all or jump to an inner function. I don't get what was your intent with that commit. -- Cedric BAIL -- This SF Dev2Dev email is sponsored by: WikiLeaks The End of the Free Internet http://p.sf.net/sfu/therealnews-com ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: englebass trunk/efreet/src/lib
On 12/09/2010 02:22 PM, Cedric BAIL wrote: On Thu, Dec 9, 2010 at 2:15 PM, Enlightenment SVN no-re...@enlightenment.org wrote: Log: Reduce stack usage For functions often called, don't put unneded mem on stack That commit doesn't make anysense to me. tmp = alloca(PATH_MAX) is strictly the same as a char tmp[PATH_MAX]. And stack usage is only accounted when you use it all or jump to an inner function. I don't get what was your intent with that commit. I though the stack mem was allocated when it was defined. So the old code would allocate when entering the function, and the new code when reaching alloca. As we only once arrive at the alloca, my thought was that it was an improvement. But it seems I don't know enough on how mem is allocated and when. Sebastian -- This SF Dev2Dev email is sponsored by: WikiLeaks The End of the Free Internet http://p.sf.net/sfu/therealnews-com ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: englebass trunk/efreet/src/lib
On Thu, Dec 9, 2010 at 11:32 AM, Sebastian Dransfeld s...@tango.flipp.net wrote: On 12/09/2010 02:22 PM, Cedric BAIL wrote: On Thu, Dec 9, 2010 at 2:15 PM, Enlightenment SVN no-re...@enlightenment.org wrote: Log: Reduce stack usage For functions often called, don't put unneded mem on stack That commit doesn't make anysense to me. tmp = alloca(PATH_MAX) is strictly the same as a char tmp[PATH_MAX]. And stack usage is only accounted when you use it all or jump to an inner function. I don't get what was your intent with that commit. I though the stack mem was allocated when it was defined. So the old code would allocate when entering the function, and the new code when reaching alloca. As we only once arrive at the alloca, my thought was that it was an improvement. But it seems I don't know enough on how mem is allocated and when. I guess compilers are not that stupid these days, but even if they do, the stack presents no cost as it's just a register and not proportional to the bytes being used. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 -- This SF Dev2Dev email is sponsored by: WikiLeaks The End of the Free Internet http://p.sf.net/sfu/therealnews-com ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: englebass trunk/efreet/src/lib
On Wed, 24 Nov 2010 13:34:21 -0800 Enlightenment SVN no-re...@enlightenment.org wrote: Log: revert, name.internal is always set Author: englebass Date: 2010-11-24 13:34:21 -0800 (Wed, 24 Nov 2010) New Revision: 54965 Modified: trunk/efreet/src/lib/efreet_icon.c Modified: trunk/efreet/src/lib/efreet_icon.c === --- trunk/efreet/src/lib/efreet_icon.c2010-11-24 21:31:24 UTC (rev 54964) +++ trunk/efreet/src/lib/efreet_icon.c 2010-11-24 21:34:21 UTC (rev 54965) @@ -553,7 +553,7 @@ } /* if this isn't the hicolor theme, and we have no other fallbacks * check hicolor */ -else if (theme-name.internal strcmp(theme-name.internal, hicolor)) +else if (strcmp(theme-name.internal, hicolor)) { Efreet_Icon_Theme *parent_theme; -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev ___ enlightenment-svn mailing list enlightenment-...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-svn still getting a segv in ephoto from this being null somehow -- Mike Blumenkrantz Zentific: Our boolean values are huge. -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: englebass trunk/efreet/src/lib
On 11/24/2010 10:39 PM, Mike Blumenkrantz wrote: On Wed, 24 Nov 2010 13:34:21 -0800 Enlightenment SVNno-re...@enlightenment.org wrote: Log: revert, name.internal is always set Author: englebass Date: 2010-11-24 13:34:21 -0800 (Wed, 24 Nov 2010) New Revision: 54965 Modified: trunk/efreet/src/lib/efreet_icon.c Modified: trunk/efreet/src/lib/efreet_icon.c === --- trunk/efreet/src/lib/efreet_icon.c 2010-11-24 21:31:24 UTC (rev 54964) +++ trunk/efreet/src/lib/efreet_icon.c2010-11-24 21:34:21 UTC (rev 54965) @@ -553,7 +553,7 @@ } /* if this isn't the hicolor theme, and we have no other fallbacks * check hicolor */ -else if (theme-name.internal strcmp(theme-name.internal, hicolor)) +else if (strcmp(theme-name.internal, hicolor)) { Efreet_Icon_Theme *parent_theme; -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev ___ enlightenment-svn mailing list enlightenment-...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-svn still getting a segv in ephoto from this being null somehow backtrace? How to reproduce? Sebastian -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: englebass trunk/efreet/src/lib
On Wed, Oct 20, 2010 at 6:39 PM, Enlightenment SVN no-re...@enlightenment.org wrote: Log: use EINA_LIST_FREE for list deletion Author: englebass Date: 2010-10-20 13:39:38 -0700 (Wed, 20 Oct 2010) New Revision: 53690 Modified: trunk/efreet/src/lib/efreet_private.h Modified: trunk/efreet/src/lib/efreet_private.h === --- trunk/efreet/src/lib/efreet_private.h 2010-10-20 20:39:19 UTC (rev 53689) +++ trunk/efreet/src/lib/efreet_private.h 2010-10-20 20:39:38 UTC (rev 53690) @@ -65,11 +65,10 @@ * If x is a valid pointer destroy x and set to NULL */ #define IF_FREE_LIST(list, free_cb) do { \ - while (list) \ - { \ - free_cb(eina_list_data_get(list)); \ - list = eina_list_remove_list(list, list); \ - } \ + void *_data; \ + EINA_LIST_FREE(list, _data) \ + free_cb(_data); \ + list = NULL; \ } while (0) list = NULL is worthless, EINA_LIST_FREE updates list... and just stops when it reaches NULL :-) -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: englebass trunk/efreet/src/lib
On Mon, Aug 2, 2010 at 5:43 PM, Enlightenment SVN no-re...@enlightenment.org wrote: Log: Check return value for realloc Author: englebass Date: 2010-08-02 13:43:09 -0700 (Mon, 02 Aug 2010) New Revision: 50753 Modified: trunk/efreet/src/lib/efreet_desktop.c trunk/efreet/src/lib/efreet_desktop_command.c Modified: trunk/efreet/src/lib/efreet_desktop.c === --- trunk/efreet/src/lib/efreet_desktop.c 2010-08-02 20:34:41 UTC (rev 50752) +++ trunk/efreet/src/lib/efreet_desktop.c 2010-08-02 20:43:09 UTC (rev 50753) @@ -824,6 +824,7 @@ { size = len + pos + 1024; string = realloc(string, size); + if (!string) return NULL; no... it's wrong, the old string pointer is now lost! You need to get the return into another tmp variable and swap after you know it worked. Lucas, maybe you can add a script to check for x = realloc(x,...)? -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: englebass trunk/efreet/src/lib
On Mon, Aug 2, 2010 at 6:21 PM, Gustavo Sverzut Barbieri barbi...@profusion.mobi wrote: no... it's wrong, the old string pointer is now lost! You need to get the return into another tmp variable and swap after you know it worked. Lucas, maybe you can add a script to check for x = realloc(x,...)? Yes, this is easy, as well as checking if the returned value of realloc is never checked for null. Lucas De Marchi -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: englebass trunk/efreet/src/lib
On Tue, Apr 6, 2010 at 8:35 PM, Enlightenment SVN no-re...@enlightenment.org wrote: Log: efreet: TODO++ Author: englebass Date: 2010-04-06 11:35:18 -0700 (Tue, 06 Apr 2010) New Revision: 47788 Modified: trunk/efreet/src/lib/efreet_menu.c Modified: trunk/efreet/src/lib/efreet_menu.c === --- trunk/efreet/src/lib/efreet_menu.c 2010-04-06 18:18:53 UTC (rev 47787) +++ trunk/efreet/src/lib/efreet_menu.c 2010-04-06 18:35:18 UTC (rev 47788) @@ -1,5 +1,7 @@ /* vim: set sw=4 ts=4 sts=4 et: */ +/* TODO: Check where strcmp can be changed with == because of stringshare */ + #ifdef HAVE_CONFIG_H # include config.h #endif When string come from eet mapped file you can also use == to compare them. But you can't compare a stringshare against a mapped string. -- Cedric BAIL -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E SVN: englebass trunk/efreet/src/lib
On Thu, 1 Apr 2010, Enlightenment SVN wrote: Log: efreet: fancy alloca include in common header I hope that you didn't break Windows compilation with that move. I have to check that Vincent Author: englebass Date: 2010-04-01 12:32:41 -0700 (Thu, 01 Apr 2010) New Revision: 47664 Modified: trunk/efreet/src/lib/efreet_ini.c trunk/efreet/src/lib/efreet_private.h Modified: trunk/efreet/src/lib/efreet_ini.c === --- trunk/efreet/src/lib/efreet_ini.c 2010-04-01 19:32:29 UTC (rev 47663) +++ trunk/efreet/src/lib/efreet_ini.c 2010-04-01 19:32:41 UTC (rev 47664) @@ -12,23 +12,6 @@ #include unistd.h #include sys/mman.h -#ifdef HAVE_ALLOCA_H -# include alloca.h -#elif defined __GNUC__ -# define alloca __builtin_alloca -#elif defined _AIX -# define alloca __alloca -#elif defined _MSC_VER -# include malloc.h -# define alloca _alloca -#else -# include stddef.h -# ifdef __cplusplus -extern C -# endif -void *alloca (size_t); -#endif - #include Ecore_File.h #include Efreet.h Modified: trunk/efreet/src/lib/efreet_private.h === --- trunk/efreet/src/lib/efreet_private.h 2010-04-01 19:32:29 UTC (rev 47663) +++ trunk/efreet/src/lib/efreet_private.h 2010-04-01 19:32:41 UTC (rev 47664) @@ -4,6 +4,24 @@ #include Eet.h +#ifdef HAVE_ALLOCA_H +# include alloca.h +#elif defined __GNUC__ +# define alloca __builtin_alloca +#elif defined _AIX +# define alloca __alloca +#elif defined _MSC_VER +# include malloc.h +# define alloca _alloca +#else +# include stddef.h +# ifdef __cplusplus +extern C +# endif +void *alloca (size_t); +#endif + + /** * @file efreet_private.h * @brief Contains methods and defines that are private to the Efreet -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ enlightenment-svn mailing list enlightenment-...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-svn -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel