Remove underlinking of libclsmoke and add a darwin case to the library definitons.
Annotate for file src/libsmoke/smoke.lisp
2009-04-05 tobias 1 (in-package #:smoke)
15:36:29 ' 2
' 3 (eval-when (:load-toplevel :compile-toplevel :execute)
2010-01-10 tobias 4 (define-foreign-library libclsmoke
2010-02-17 tobias 5 (:darwin "libclsmoke.dylib")
2010-01-10 tobias 6 (:unix "libclsmoke.so")
08:49:36 ' 7 (t (:default "libclsmoke")))
' 8 (define-foreign-library libclsmokeutil
2010-02-17 tobias 9 (:darwin "libclsmokeutil.dylib")
2010-01-10 tobias 10 (:unix "libclsmokeutil.so")
08:49:36 ' 11 (t (:default "libclsmokeutil")))
' 12 (use-foreign-library libclsmoke))
2009-04-05 tobias 13
15:36:29 ' 14 (eval-when (:load-toplevel :compile-toplevel :execute)
2010-01-10 tobias 15 (use-foreign-library libclsmokeutil)
08:49:36 ' 16 (defcfun (smoke-sizeof-bool "cl_smoke_sizeof_bool") :int)
2009-04-05 tobias 17 (defun cffi-bool-type ()
15:36:29 ' 18 "Returns a cffi unsigned int type with the same size as a C++ bool."
2010-01-10 tobias 19 (load-foreign-library 'libclsmokeutil)
2009-05-11 tobias 20 (intern (format nil "UINT~A" (* 8 (smoke-sizeof-bool)))
2009-04-05 tobias 21 (find-package :keyword)))
15:36:29 ' 22
' 23 (defmacro defcxxbool ()
' 24 `(defctype cxx-bool (:boolean ,(cffi-bool-type)))))
' 25
' 26 (defcxxbool)
' 27
2010-01-10 tobias 28 ;(close-foreign-library 'libclsmokeutil)
2009-04-05 tobias 29
15:36:29 ' 30 (defctype smoke-binding :pointer
' 31 "A Smoke binding")
' 32
' 33 (defctype smoke-index :short
' 34 "An index")
' 35
2009-05-11 tobias 36 (deftype smoke-index (&optional (lower -32768) (upper 32767))
11:07:39 ' 37 "Smoke index."
' 38 `(integer ,lower ,upper))
' 39
2010-02-18 tobias 40 (defcfun (smoke-init "cl_smoke_init") smoke-binding
2010-02-19 tobias 41 (smoke :pointer)
2009-04-05 tobias 42 (destruct :pointer)
15:36:29 ' 43 (dispatch :pointer))
' 44
2010-02-18 tobias 45 (defcfun (smoke-destruct "cl_smoke_destruct") :void
2009-04-05 tobias 46 (smoke smoke-binding))
15:36:29 ' 47
2009-12-13 tobias 48 ;; Smoke::ModuleIndex is a POD-struct.
10:17:08 ' 49 ;; Thus we can treat it as a C struct.
2009-04-05 tobias 50 (defcstruct smoke-module-index
15:36:29 ' 51 (smoke :pointer)
' 52 (index smoke-index))
' 53
2010-02-19 tobias 54 (declaim (inline smoke-get-smoke))
21:10:24 ' 55 (defcfun (smoke-get-smoke "cl_smoke_get_smoke") :pointer
' 56 (smoke-binding smoke-binding))
' 57
2010-01-10 tobias 58 (defcfun (smoke-get-module-name "cl_smoke_get_module_name") :string
2009-04-05 tobias 59 (smoke :pointer))
2009-06-22 tobias 60
12:18:08 ' 61 (defcenum cl-smoke-array
' 62 :classes
' 63 :methods
' 64 :method-maps
' 65 :method-names
' 66 :types
' 67 :inheritance-list
' 68 :argument-list
' 69 :ambiguous-method-list)
' 70
' 71 (defcfun cl-smoke-array :pointer
' 72 (smoke :pointer)
' 73 (array cl-smoke-array))
' 74
' 75 (defcfun cl-smoke-array-size smoke-index
' 76 (smoke :pointer)
' 77 (array cl-smoke-array))