Added type methods for automatic type declarations
authorespen <espen>
Fri, 7 Sep 2007 07:33:51 +0000 (07:33 +0000)
committerespen <espen>
Fri, 7 Sep 2007 07:33:51 +0000 (07:33 +0000)
glib/glib.lisp

index 2b3e256..2bb7101 100644 (file)
@@ -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")
 (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))
   (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))
   (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))