Thank you for the tips, Doug, I have used the code in my latest "sodium" PR.
23.03.2020, 03:13, "Doug Coleman" <doug.cole...@gmail.com>:
You could do this:: SODIUM_SIZE_MAX ( -- x ) cell-bits on-bits ;where cell-bits gives 32/64 and on-bits turns them to ones.,,On Sun, Mar 22, 2020 at 6:44 PM Alexander Ilin <ajs...@yandex.ru> wrote:Hello!
I'm creating the sodium library FFI for Factor, and I found the following definition in the Sodium C headers:
#define SODIUM_MIN(A, B) ((A) < (B) ? (A) : (B))
#define SODIUM_SIZE_MAX SODIUM_MIN(UINT64_MAX, SIZE_MAX)
I think SODIUM_SIZE_MAX is used as platform-dependent macro constant, which represents a maximum value for array sizes and similar memory limits.
It'll have the max value of the size_t type, which is either 16-bit, 32-bit or 64-bit depending on the compilation target platform.
How should I define the SODIUM_SIZE_MAX constant in Factor?
---=====---
Александр
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk
---=====---
Александр
_______________________________________________ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk