-
Notifications
You must be signed in to change notification settings - Fork 2
/
clorb-basetypes.lisp
76 lines (52 loc) · 1.36 KB
/
clorb-basetypes.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
;;;; Basic CORBA types
(in-package :clorb)
;;;; Basic types
(deftype corba:boolean ()
t)
(deftype corba:char ()
'character)
(deftype corba:wchar ()
;; FIXME! is this wide ?
'character)
(deftype corba:octet ()
'(unsigned-byte 8))
(deftype corba:string ()
'string)
(deftype corba:wstring ()
;; FIXME
'(simple-array corba:wchar))
(deftype corba:short ()
'(signed-byte 16))
(deftype corba:ushort ()
'(unsigned-byte 16))
(deftype corba:long ()
'(signed-byte 32))
(deftype corba:ulong ()
'(unsigned-byte 32))
(deftype corba:longlong ()
'(signed-byte 64))
(deftype corba:ulonglong ()
'(unsigned-byte 64))
(deftype corba:float ()
(%SYSDEP "24 bit float"
(if (>= (float-precision short-float-epsilon) 24)
'short-float
'single-float)))
(deftype corba:double ()
(%SYSDEP "53 bit float"
'double-float))
(deftype corba:longdouble ()
(%SYSDEP "112 bit float"
'long-float))
(deftype corba:fixed ()
'rational)
(deftype fixed (digits scale)
(let ((limit (if (< scale 0)
(* (expt 10 digits) (expt 10 (- scale)))
(/ (expt 10 digits) (expt 10 scale)))))
`(rational (,(- limit)) (,limit))))
;;;; Exception types
(define-condition corba:exception (serious-condition)
())
(define-condition corba:userexception (corba:exception)
())