On Tuesday, 13 March 2007, at 20:46:20 (+0100),
Sebastian Dransfeld wrote:

> Why do I bother arguing?

About making a clean function destructive?  Heck if I know...

If you wanted to remove the strdup(), the caller would have to accept
the destructive nature of the function or remember to pass strdup(str)
as the first parameter instead of just str.  This would be okay (i.e.,
no memory leak) since the pointer is reused.  But it still makes ugly
and non-intuitive code.  Better to leave it as is.

Michael

-- 
Michael Jennings (a.k.a. KainX)  http://www.kainx.org/  <[EMAIL PROTECTED]>
n + 1, Inc., http://www.nplus1.net/       Author, Eterm (www.eterm.org)
-----------------------------------------------------------------------
 "He who hesitates, dies."                             -- Greg Lippman

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to