On Thu, 23 Aug 2012 14:46:43 +0100 Michael Blumenkrantz
<michael.blumenkra...@gmail.com> said:

> fair enough, but it still seems like it should be stringshared so that you
> can avoid strcmps

thats if the strcmp mattered in terms of perf :)

> On Thu, Aug 23, 2012 at 2:42 PM, Carsten Haitzler <ras...@rasterman.com>wrote:
> 
> > On Thu, 23 Aug 2012 14:12:04 +0100 Michael Blumenkrantz
> > <michael.blumenkra...@gmail.com> said:
> >
> > > in e_action_add, we use the string passed as the action name. it seems to
> > > me that this must be wrong, as most actions are added using
> > stack-allocated
> > > strings which cease to exist at some later point.
> > >
> > > why are we not stringsharing here?
> >
> > it's avoiding using heap (mallocing) by takign the string not from stack
> > -but
> > CODE. if you do this:
> >
> > e_action_add("hello");
> >
> > then "hello" is not on the stack... it's.... in the code segment. it' a
> > string
> > that is ALWAYS available (from disk/executable file) directly.
> >
> > this is ONLY a problem if the string comes from a module and u dlclose()
> > the
> > module before u del the action and the string it uses. :)
> >
> > --
> > ------------- Codito, ergo sum - "I code, therefore I am" --------------
> > The Rasterman (Carsten Haitzler)    ras...@rasterman.com
> >
> >


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to