fix _short' and other non-_int' integer types, and add `_intptr' test

This commit is contained in:
Matthew Flatt 2010-10-13 08:41:29 -06:00
parent 1203a89a0f
commit 6e23fcda5f
2 changed files with 6 additions and 1 deletions

View File

@ -47,7 +47,7 @@
;; utility for the next few definitions
(define (sizeof->3ints c-type)
(case (compiler-sizeof 'int)
(case (compiler-sizeof c-type)
[(2) (values _int16 _uint16 _int16)]
[(4) (values _int32 _uint32 _int32)]
[(8) (values _int64 _uint64 _int64)]

View File

@ -234,6 +234,11 @@
(test 1 ptr-ref v _int16 0)
(test 3 ptr-ref v _int16 3))
;; Test intptr:
(let ([v (malloc _pointer)])
(ptr-set! v _pointer (ptr-add #f 107))
(test 107 ptr-ref v _intptr))
(delete-test-files)
(report-errs)