forked from pinterface/burgled-batteries
-
Notifications
You must be signed in to change notification settings - Fork 1
/
grovel-guess.lisp
101 lines (93 loc) · 3.18 KB
/
grovel-guess.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
;; For platforms where compiling a grovel file is too difficult (Windows), just
;; guess at appropriate values.
(cl:in-package #:python.cffi)
(cffi:defctype ssize-t (or #+cffi-features:x86 :int32
#+cffi-features:x86-64 :int64
(error "Unable to guess ssize-t.")))
(cl:defconstant size-of-ssize-t (cffi:foreign-type-size 'ssize-t))
(cffi:defctype size-t (or #+cffi-features:x86 :uint32
#+cffi-features:x86-64 :uint64
(error "Unable to guess size-t.")))
(cl:defconstant size-of-size-t (cffi:foreign-type-size 'size-t))
(cffi:defcenum (parser-context)
(:expression 258)
(:statement 256)
(:file 257))
(cffi:defcenum (trace-what)
(:call 0)
(:exception 1)
(:line 2)
(:return 3)
(:c-call 4)
(:c-exception 5)
(:c-return 6))
(cffi:defcenum (comparison-operator)
(:< 0)
(:<= 1)
(:= 2)
(:/= 3)
(:> 4)
(:>= 5))
(cffi:defbitfield (type-flags :long)
(:have-get-char-buffer #x00000001)
(:have-sequence-in #x00000002)
(:gc #x00000000)
(:have-in-place-ops #x00000008)
(:check-types #x00000010)
(:have-rich-compare #x00000020)
(:have-weak-refs #x00000040)
(:have-iter #x00000080)
(:have-class #x00000100)
(:heap-type #x00000200)
(:base-type #x00000400)
(:ready #x00001000)
(:readying #x00002000)
(:have-gc #x00004000)
(:have-stackless-extension #x00018000) ; stackless gets two bits
(:have-index #x00020000)
(:have-version-tag #x00040000)
(:valid-version-tag #x00080000)
(:is-abstract #x00100000)
(:have-new-buffer #x00200000)
(:int-subclass #x00800000)
(:long-subclass #x01000000)
(:list-subclass #x02000000)
(:tuple-subclass #x04000000)
(:string-subclass #x08000000)
(:unicode-subclass #x10000000)
(:dict-subclass #x20000000)
(:base-exception-subclass #x40000000)
(:type-subclass #x80000000)
(:default-external #x000201eb)
(:default-core #x000601eb)
(:default #x000201eb))
(cffi:defbitfield (method-convention-flags)
(:positional-arguments #x0001)
(:keyword-arguments #x0002)
(:mixed-arguments #x0003)
(:no-arguments #x0004)
(:object-method #x0008)
(:class-binding #x0010)
(:static-binding #x0020)
(:coexist #x0040)
(:replace-existing #x0040))
(cffi:defcenum (member-type)
(:short 0)
(:int 1)
(:long 2)
(:float 3)
(:double 4)
(:string 5)
(:object 6)
(:object-ex 16)
(:char 7)
(:byte 8)
(:unsigned-byte 9)
(:unsigned-int 11)
(:unsigned-short 10)
(:unsigned-long 12)
(:boolean 14)
(:long-long 17)
(:unsigned-long-long 18)
(:ssize-t 19))
(cl:defconstant +api-version+ 1013)