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


On Tue, 2010-10-05 at 11:33 +0100, Michael Meeks wrote:
Hi there,

      Fair enough; so an explicit cast in the code calling the operator:

      rStrm << static_cast<sal_uInt8>(aBool) << ...;

      sort of thing ?

Do we have a concrete example of where we have a BOOL getting streamed
out at the moment ? My first instinct would be to change whatever aBool
element is currently a BOOL and getting streamed to disk to a sal_uInt8
in its declaration. e.g.

struct StreamMe
{
    sal_uInt16 foo;
-    BOOL bar;
+    sal_uInt8 bar;
};

rather than getting into cast foo.

I see we also have a << >> SvStream operators for "long" which is
another disaster seeing as a long is either 32bits of 64bits in size
depending on platform.

      Weelll ... the operator in fact only streams 4 bytes regardless of
architecture ...

Well, has the bright side that at least anything streaming longs isn't
creating dumps which can't be read on a different long-sized arch.

      I guess; OTOH - do we really want to get into some monster LONG ->
sal_Int32 replacement scheme just now ? :-) I'd rather get hackers
re-focused on the higher-win tasks further up the stack really.

Sure, its not critical, but 32bit vs 64bit long/sal_Int32 mixups cause
real bugs. e.g.
http://cgit.freedesktop.org/libreoffice/components/commit/?id=18e69aa675aed764226eb496a34a8c0313e9c9d0
which is a different area, but illustrates the kind of cockup which
might be hiding from us at the moment.

C.


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.