Liste des Groupes | Revenir à cl c |
bart <bc@freeuk.com> writes:cJSON.c is C89. And these additions to the resource compiler were inspired by a menntion of cJSON.c here.
On 24/05/2024 02:39, Tim Rentsch wrote:C89 doesn't have long long.
>Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:>
>On 24/05/2024 00:52, Tim Rentsch wrote:>
>Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:>
>On 23/05/2024 23:49, Tim Rentsch wrote:>
>Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:>
>What is a good hash function for pointers to use in portable>
ANSI C?
I have a preliminary question. Do you really mean ANSI C, or
is C99 acceptable?
C89 is better.
But the pass has been sold.
I'm not asking which you think is better. I'm asking about
what your requirements are.
C 89.
I don't want to pull in C99 types and so on just for a hash
function.
In that case I think you are stuck with using a half-baked
solution. The standard integer types available in C89 just
aren't a good fit in a 64-bit world.
I assume the C89 implementation is one that can target current 64
bit machines.
>
Then char, short, int, long long will almost certainly have widths
of 8, 16, 32 and 64 bits respectively.
(I don't know if 'long long' was part of C89, but it sounds likeWhat he said was C89. He didn't mention stdint.h. I take
Malcolm just doesn't want to be bothered with stdint.h, and any
compiler used is like to support it.
him at his word. If what he wants is something different,
he should say clearly what it is, and not make people guess
about it. (To be clear this recommendation is intended for
every questioner, not just Malcolm.)
Les messages affichés proviennent d'usenet.