From: espen Date: Fri, 7 Sep 2007 07:33:51 +0000 (+0000) Subject: Added type methods for automatic type declarations X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/clg/commitdiff_plain/e1531bff3f558c21de73f423d9b19c66a0f33c7c Added type methods for automatic type declarations --- diff --git a/glib/glib.lisp b/glib/glib.lisp index 2b3e256..2bb7101 100644 --- a/glib/glib.lisp +++ b/glib/glib.lisp @@ -20,7 +20,7 @@ ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -;; $Id: glib.lisp,v 1.40 2007-06-15 12:25:16 espen Exp $ +;; $Id: glib.lisp,v 1.41 2007-09-07 07:33:51 espen Exp $ (in-package "GLIB") @@ -52,6 +52,11 @@ (defbinding (%deallocate-memory "g_free") () nil (setf *memory-allocator* #'%allocate-memory) (setf *memory-deallocator* #'%deallocate-memory) +(defbinding (reallocate-memory "g_realloc") () pointer + (address pointer) + (size unsigned-long)) + + ;;;; User data mechanism (defvar *user-data-lock* (make-mutex)) @@ -179,6 +184,12 @@ (define-type-method alien-type ((type glist)) (declare (ignore type)) (alien-type 'pointer)) +(define-type-method argument-type ((type glist)) + 'list) + +(define-type-method return-type ((type glist)) + 'list) + (define-type-method size-of ((type glist) &key inlined) (assert-not-inlined type inlined) (size-of 'pointer)) @@ -332,6 +343,12 @@ (define-type-method alien-type ((type gslist)) (declare (ignore type)) (alien-type 'pointer)) +(define-type-method argument-type ((type gslist)) + 'list) + +(define-type-method return-type ((type gslist)) + 'list) + (define-type-method size-of ((type gslist) &key inlined) (assert-not-inlined type inlined) (size-of 'pointer))