X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/clg/blobdiff_plain/a9acf424993f3d35432878cd879fc1b8d8dba758..580820d8044f45eb58f39b9d52d185d2efd16bcd:/glib/genums.lisp?ds=sidebyside diff --git a/glib/genums.lisp b/glib/genums.lisp index 428a486..06985c6 100644 --- a/glib/genums.lisp +++ b/glib/genums.lisp @@ -15,7 +15,7 @@ ;; License along with this library; if not, write to the Free Software ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -;; $Id: genums.lisp,v 1.10 2005-02-14 00:43:43 espen Exp $ +;; $Id: genums.lisp,v 1.12 2005-03-06 17:26:23 espen Exp $ (in-package "GLIB") @@ -23,7 +23,7 @@ (in-package "GLIB") (defun %map-enum (mappings op) (loop - as value = 1 then (1+ value) + as value = 0 then (1+ value) for mapping in mappings collect (let ((symbol (if (atom mapping) mapping (first mapping)))) (unless (atom mapping) @@ -331,7 +331,7 @@ (defun expand-enum-type (type-number forward-p options) (remove-if #'(lambda (mapping) (eq (second mapping) nil)) mappings)))) `(progn - (register-type ',type ,(find-type-name type-number)) + (register-type ',type ',(find-type-init-function type-number)) ,(ecase super (enum `(define-enum-type ,type ,@expanded-mappings)) (flags `(define-flags-type ,type ,@expanded-mappings))))))