chiark / gitweb /
Bug fixes
authorespen <espen>
Fri, 3 Mar 2006 10:01:01 +0000 (10:01 +0000)
committerespen <espen>
Fri, 3 Mar 2006 10:01:01 +0000 (10:01 +0000)
glib/gobject.lisp

index facb3864d3e7cb2afab9cb7e69a4ce8f41f8c8e5..bf5040aa88aaed0c57c27b93fddc35b636424db5 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: gobject.lisp,v 1.50 2006/02/26 15:30:01 espen Exp $
+;; $Id: gobject.lisp,v 1.51 2006/03/03 10:01:01 espen Exp $
 
 (in-package "GLIB")
 
@@ -557,17 +557,17 @@ (register-derivable-type 'gobject "GObject" 'expand-gobject-type 'gobject-depend
 ;;; Pseudo type for gobject instances which have their reference count
 ;;; increased by the returning function
 
-;; (deftype referenced (type) type)
+(deftype referenced (type) type)
 
 (define-type-method alien-type ((type referenced))
   (declare (ignore type))
   (alien-type 'gobject))
 
 (define-type-method from-alien-form ((type referenced) form)
-  (let ((type (second type)))
+  (let ((class (second (type-expand-to 'referenced type))))
     (if (subtypep type 'gobject)
        (let ((instance (make-symbol "INSTANCE")))
-         `(let ((,instance ,(from-alien-form type form)))
+         `(let ((,instance ,(from-alien-form class form)))
             (when ,instance
               (%object-unref (foreign-location ,instance)))
             ,instance))