Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
102 lines (93 sloc) 3.18 KB
;; 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)