[Libreoffice] Purpose of easy task 'Get rid of sal_uLong' ?
bjoern.michaelsen at canonical.com
Mon Mar 28 04:08:38 PDT 2011
On Mon, 28 Mar 2011 12:45:11 +0200
Lubos Lunak <l.lunak at suse.cz> wrote:
> Specifically, the simple and logical type for numbers happens to be
> 'int'. Some kind of intptr type is usually only for ugly hacks, and
> bit-precise types are mainly for marshalling. Is there any point in
> keeping the task as it is or can I change it to 'use sal_uInt32 if
> the precise size is need, e.g. for marshalling, use sal_uIntPtr if it
> is used for storing pointer value, otherwise simply use int'? And,
> looking at this description, is there any plan to get rid of these
> superfluous sal_xxx types eventually?
IHMO, our aim should be to have _one_ canonical set of numerical types
in LibreOffice, and not one for marshalling, one for other cases.
Using non sal_* numeric types is just asking for trouble in the long
run, because some day you will need to marshall that stuff somewhere.
And there is absolutely no hurt in using the sal_* typedefs(*).
(*) Other than "native" numeric types, which might have interesting new
sizes on every new platform.
More information about the LibreOffice