Hi Przemek,

The other area which will need to be cleaned is 
mem allocation functions (as discussed before). 
Currently it uses ULONG, but should be size_t probably.
(GC and hb_x*()).

Plus a few other value types to migrate form ULONG to 
something else:

32-bit crc values -> HB_U32
pcount -> int ?
class related ULONG value -> ?
file attribute -> HB_U32 ? or rather HB_FATTR
arg count -> int ?
alloc size -> size_t ?
file I/O -> HB_FOFFSET / HB_SIZE
clock/time related -> HB_U32 ?
parinfa retval -> HB_SIZE ?

Brgds,
Viktor

On 2010 Jan 14, at 11:04, Viktor Szakáts wrote:

>> On Thu, 14 Jan 2010, Szak�ts Viktor wrote:
>>>>> First actual question is what to do with ULONG in 
>>>>> hb_fsSeek(). Should it be changed to HB_SIZE or not?
>>>> No. It cannot be HB_SIZE. It will be bug. The same is for other
>>>> functions like hb_fsWriteLarge(). All such functions have to use
>>>> parameters which are accepted by low level OS functions without
>>>> any size lost conversions.
>>> Okay, but what non-windows type to use then? int, long, else?
>> 
>> As long as you do not update code which may use it then you should
>> use the same type 'unsigned long'.
>> In fact it will be good to eliminate hb_fs*Large() functions
>> and use only one set of functions using HB_FOFFSET as file pointer
>> and HB_SIZE as the block size but for this we should rewrite these
>> functions.
> 
> Looks perfect.
> 
> Brgds,
> Viktor
> 

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to