ffi/unsafe/com: fix VT_BOOL representation
A VT_BOOL isn't a _bool; it's a 16-bit #xFFFF or #x0000. Closes PR 14425
This commit is contained in:
parent
9a455ccc12
commit
3e3829c2b9
|
@ -1461,7 +1461,13 @@
|
||||||
(* s CY-factor))
|
(* s CY-factor))
|
||||||
(lambda (s)
|
(lambda (s)
|
||||||
(/ s CY-factor))))
|
(/ s CY-factor))))
|
||||||
|
|
||||||
|
(define _bool16
|
||||||
|
(make-ctype _uint16
|
||||||
|
(lambda (s)
|
||||||
|
(if s #xFFFF #x0000))
|
||||||
|
(lambda (s)
|
||||||
|
(positive? s))))
|
||||||
|
|
||||||
(define (unsigned-int? v n)
|
(define (unsigned-int? v n)
|
||||||
(and (exact-integer? v)
|
(and (exact-integer? v)
|
||||||
|
@ -1761,7 +1767,7 @@
|
||||||
[(string) (_system-string/utf-16 mode)]
|
[(string) (_system-string/utf-16 mode)]
|
||||||
[(currency) _currency]
|
[(currency) _currency]
|
||||||
[(date) _date]
|
[(date) _date]
|
||||||
[(boolean) _bool]
|
[(boolean) _bool16]
|
||||||
[(scode) _SCODE]
|
[(scode) _SCODE]
|
||||||
[(iunknown) (_IUnknown-pointer-or-com-object mode)]
|
[(iunknown) (_IUnknown-pointer-or-com-object mode)]
|
||||||
[(com-object) (_com-object mode)]
|
[(com-object) (_com-object mode)]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user