[devel] [SCM] packages/apt: heads/rework-dynamic-mmap

Dmitry V. Levin ldv на altlinux.org
Вт Фев 11 17:00:05 MSK 2020


On Tue, Feb 11, 2020 at 04:47:41PM +0300, Ivan Zakharyaschev wrote:
[...]
> commit e785f0e8636e47a672445e70f2923a5eea566b33
> Author: Ivan Zakharyaschev <imz на altlinux.org>
> Date:   Wed Jan 29 04:41:13 2020 +0300
> 
>     use the safer C++-style static_cast instead of a C-style cast (from void*)
>     
>     What is happening here:
>     
>     Map->RawAllocate() returns the index in an array of bytes (i.e., of char;
>     no matter whether they are (un)signed); therefore, we cast the base
>     pointer to the corresponding type, so that the pointer arithmetic
>     gives a pointer to the beginning of the allocated space.
>     
>     We do not want to rely on non-standard void*-arithmetic.

We - это кто, и почему они не хотят полагаться на то, что работает?


-- 
ldv


Подробная информация о списке рассылки Devel