Re: [E-devel] E CVS: libs/eet barbieri
On 10/3/07, Vincent Torri <[EMAIL PROTECTED]> wrote: > On Tue, 2 Oct 2007, Enlightenment CVS wrote: > > >while ((p < (char *)src_end) && (*p != 0)) {len++; p++;} > > + > > + /* fast handle of simple case 0xMp+E*/ > > + if ((len == 6) && (s[0] == '0') && (s[1] == 'x') && (s[3] == 'p')) > > + { > > + int mantisse = (s[2] >= 'a') ? (s[2] - 'a' + 10) : (s[2] - '0'); > > + int exponent = 1 << (s[5] - '0'); > > + > > + if (s[4] == '+') *d = ((float)mantisse) * (float)exponent; > > + else *d = ((float)mantisse) / (float)exponent; > > + > > + return len + 1; > > + } > > + > >str = alloca(len + 1); > >memcpy(str, s, len); > >str[len] = '\0'; > > Is there a reason not to put this code in _eet_string_to_double_convert ? look at this code as a "cache", but instead of wasting a bit of memory it's wasting a bit of cpu... with it we can avoid memcpy() function call, etc... it's very fast and simple and handle cases like 0.0, 1.0, 0.25, 0.5 I can rework this as a static inline function defined outside this function body and then call it: if (string_to_double_cache_get(s, len, d) == 1) return len + 1; do you like this way most? I do, I can change if required. > Also, is it necessary to use alloca and make a copy of s (as we know the > length of the string) ? yes, we could use this fixed size and avoid alloca() -- Gustavo Sverzut Barbieri -- Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] ICQ#: 17249123 Skype: gsbarbieri Mobile: +55 (81) 9927 0010 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] Nightly build log for E17 on 2007-10-03 07:00:59 -0700
Build log for Enlightenment DR 0.17 on 2007-10-03 07:00:59 -0700 Build logs are available at http://download.enlightenment.org/tests/logs Packages that failed to build: eflpp http://download.enlightenment.org/tests/logs/eflpp.log engage http://download.enlightenment.org/tests/logs/engage.log entropy http://download.enlightenment.org/tests/logs/entropy.log epdf http://download.enlightenment.org/tests/logs/epdf.log evfs http://download.enlightenment.org/tests/logs/evfs.log evolve http://download.enlightenment.org/tests/logs/evolve.log Packages with no supported build system: esmart_rsvg, exorcist, python-efl, Packages skipped: camE, enotes, enscribe, epbb, eplay, erss, etk_server, etox, e_utils, Evas_Perl, evoak, gfx_routines, lvs-gui, med, nexus, notgame, ruby-efl, webcam, Packages that build OK: alarm, bling, cpu, deskshow, eclair, ecore, edb, e_dbus, edje_editor, edje, edje_viewer, edvi, eet, eflame, efreet, elapse, elation, elicit, elitaire, e, embrace, embryo, emotion, emphasis, empower, emu, engrave, engycad, enhance, enity, enterminus, enthrall, entice, entrance_edit_gui, entrance, envision, epeg, ephoto, e_phys, epsilon, equate, esmart, estickies, etk_extra, etk, etk-perl, evas, ewl, examine, exhibit, exml, expedite, express, extrackt, feh, flame, forecasts, gevas2, iconbar, imlib2_loaders, imlib2, Imlib2_Perl, imlib2_tools, language, mail, mem, mixer, moon, net, news, pesh, photo, rage, rain, screenshot, scrot, slideshow, snow, taskbar, tclock, uptime, weather, winselector, wlan, Debian GNU/Linux 4.0 \n \l Linux enlightenment2 2.6.18-4-686 #1 SMP Wed May 9 23:03:12 UTC 2007 i686 GNU/Linux See http://download.enlightenment.org/tests/ for details. - 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-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E CVS: libs/etk cmarcelo
On 10/3/07, Enlightenment CVS <[EMAIL PROTECTED]> wrote: > Enlightenment CVS committal > > Author : cmarcelo > Project : e17 > Module : libs/etk > > Dir : e17/libs/etk/src/lib > > > Modified Files: > etk_signal.c etk_signal.h > > > Log Message: > Minor changes in signals. > > - export lookup_by_code and lookup_by_name (mainly for bindings' sake) for bindings you should use one of: Etk_Signal *etk_type_signal_get(Etk_Type *type, int signal_code); Etk_Signal *etk_type_signal_get_by_name(Etk_Type *type, const char *signal_name); so no need to have these exported, they should remain static. > +/** > + * @brief Gets the signal corresponding to the code and the object type. > + * > + * assumes @a signal_name and @a type to be valid. > + */ > +Etk_Signal *etk_signal_lookup_by_code(int signal_code, Etk_Type *type) > +{ > + if (!type) > + return NULL; the comment "assumes @a signal_name and @a type to be valid." makes no sense since there is no signal_name and you are checking for type. As I said before, don't export this function, use etk_type_signal_get_by_name() instead, also leave the internal function without the checks since with their usage it should not be required (and if type is NULL it should break because it's really a bug somewhere). What could be done is document "@see etk_type_signal_get_by_name()". etk_signal stuff shall remain internal as much as possible. As I said before, it would be great to have connect() as a method of object, not signal. -- Gustavo Sverzut Barbieri -- Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] ICQ#: 17249123 Skype: gsbarbieri Mobile: +55 (81) 9927 0010 - 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-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] E CVS: libs/etk cmarcelo
On 10/4/07, Gustavo Sverzut Barbieri <[EMAIL PROTECTED]> wrote: > > [...snip...] > As I said before, it would be great to have > connect() as a method of object, not signal. > > That's actually what I have done in etk-perl the SignalConnect is a method of Etk::Object from a user's point of view, and it will do the necessary translation work internally. -- Chady 'Leviathan' Kassouf http://chady.net/ - 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-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel