Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On Sun, Dec 2, 2012 at 10:59 PM, Norbert Thiebaud <nthiebaud@gmail.com> wrote:
vaguely related... since we are talking about performance... why
*_new_WithLength() in strtmpl.cxx is doing a memset on the whole newly
allocated buffer...
surely the allocated buffer will be filled with something soon
enough... all that is needed is buffer[0] = 0 to make getStr()
C-string-safe.

Oh, apparently you noticed too... later in the patch:

+        rtl_uString* buffer = NULL;
+        rtl_uString_new_WithLength( &buffer, l ); // TODO this
clears, not necessary

:-)

Norbert

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.