ffi/unsafe: add _size', _ssize', _ptrdiff', _intmax', `_uintmax'

These additions could create backward-compatibility problems, but our
searches suggest that problems will be rare; it's more common for
`_size_t' to be incorrectly aliased to `_int', so having definitions
for these standard types is likely to avoid future problems.
This commit is contained in:
Matthew Flatt 2013-02-18 13:23:29 -07:00
parent 85f9fbbaee
commit d46411d317
3 changed files with 16 additions and 0 deletions

View File

@ -93,6 +93,12 @@
(provide _intptr _uintptr _sintptr)
(define-values (_intptr _uintptr _sintptr) (sizeof->3ints '(void *)))
(define* _size _uintptr)
(define* _ssize _intptr)
(define* _ptrdiff _intptr)
(define* _intmax _intptr)
(define* _uintmax _uintptr)
;; ----------------------------------------------------------------------------
;; Getting and setting library objects

View File

@ -151,6 +151,15 @@ correspond to @racket[_int16]. The @racket[_int] aliases correspond to
the @racket[_intptr] aliases correspond to either
@racket[_int32] or @racket[_int64], depending on the platform.}
@defthing*[([_size ctype?]
[_ssize ctype?]
[_ptrdiff ctype?]
[_intmax ctype?]
[_uintmax ctype?])]{
More aliases for basic integer types. The @racket[_size] and
@racket[_uintmax] types are aliases for @racket[_uintptr], and
the rest are aliases for @racket[_intptr].}
@defthing*[([_fixnum ctype?]
[_ufixnum ctype?])]{

View File

@ -1,4 +1,5 @@
Version 5.3.3.3
ffi/unsafe: added _size, _ssize, _ptrdiff, _intmax, _uintmax
ffi/vector: added f8vectors
scribble: 'toc-hidden style on a part no longer hides ToC
entries for sub-parts when rendering as HTML