[PATCH] Introduce cxstring::createEmpty()
Dmitri Gribenko
gribozavr at gmail.com
Mon Jan 28 15:42:07 PST 2013
Hello Argyrios & cfe-commits,
Here's the first step of the refactoring. Important points are:
(1) the name of the function -- we can repaint it whatever color you like;
(2) a slight behavior change. We used to differentiate NULL and empty
"" strings. This does not make a lot of sense (and the difference was
never documented), so I chose to normalize to empty "" strings, since
this eliminates a NULL check in the user code. (But existing code is
already polluted with those checks...)
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cxstring-create-empty-v1.patch
Type: application/octet-stream
Size: 23171 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130129/1aecbc2f/attachment.obj>
More information about the cfe-commits
mailing list