[m-dev.] Adding standard integer types
Peter Ross
pro at missioncriticalit.com
Wed Sep 17 14:07:50 AEST 2008
I'm looking at adding the type int8, int16, int32 and int64 to Mercury
and the equivalent unsigned versions.
The way I'm currently imagining doing it is to add the following
module to the library.
:- module stdint.
:- interface.
:- type int8.
:- foreign_type(c, int8, "int8_t").
:- func to_int8(int) = int8.
I will then add to the runtime the following portable stdint.h renamed
to mercury_pstdint.h
http://www.azillionmonkeys.com/qed/pstdint.h
and add to configure a test for stdint.h and if that doesn't exist we
would fall back to using mercury_pstdint.h.
Does anyone have any objections/improvements to this plan?
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions: mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the developers
mailing list