You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 6515 Reporter:@yallop Status: closed (set by @damiendoligez on 2014-08-18T13:09:19Z) Resolution: fixed Priority: normal Severity: minor Fixed in version: 4.02.0+dev Category: documentation Monitored by:@gasche
Bug description
The documentation says that nativeint has the same width as a long:
This module provides operations on the type nativeint of signed 32-bit integers (on 32-bit platforms) or signed 64-bit integers (on 64-bit platforms). This integer type has exactly the same width as that of a long integer type in the C compiler. http://caml.inria.fr/pub/docs/manual-ocaml/libref/Nativeint.html
but from my reading of the source it's actually given the same width as a pointer:
#elif SIZEOF_PTR == SIZEOF_INT
/* Hypothetical IP32L64 model */
typedef int intnat;
I have a need in ctypes for an OCaml integer type that has the same width as a pointer, and it'd be useful if nativeint were guaranteed to be a suitable choice.
The text was updated successfully, but these errors were encountered:
Original bug ID: 6515
Reporter: @yallop
Status: closed (set by @damiendoligez on 2014-08-18T13:09:19Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 4.02.0+dev
Category: documentation
Monitored by: @gasche
Bug description
The documentation says that nativeint has the same width as a long:
This module provides operations on the type nativeint of signed 32-bit integers (on 32-bit platforms) or signed 64-bit integers (on 64-bit platforms). This integer type has exactly the same width as that of a long integer type in the C compiler.
http://caml.inria.fr/pub/docs/manual-ocaml/libref/Nativeint.html
but from my reading of the source it's actually given the same width as a pointer:
#elif SIZEOF_PTR == SIZEOF_INT
/* Hypothetical IP32L64 model */
typedef int intnat;
https://github.com/ocaml/ocaml/blob/fcc2da384/byterun/config.h#L69-L72
I have a need in ctypes for an OCaml integer type that has the same width as a pointer, and it'd be useful if nativeint were guaranteed to be a suitable choice.
The text was updated successfully, but these errors were encountered: