chiark
/
gitweb
/
~mdw
/
clg
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5b50f17
)
New functions
author
espen
<espen>
Sun, 19 Dec 2004 18:18:05 +0000
(18:18 +0000)
committer
espen
<espen>
Sun, 19 Dec 2004 18:18:05 +0000
(18:18 +0000)
glib/genums.lisp
patch
|
blob
|
blame
|
history
diff --git
a/glib/genums.lisp
b/glib/genums.lisp
index 231470f3c1e1f090f79260d56145c95baa36ec75..8a0a17ed3842cb8d70ac962a03ee45aee0cc608e 100644
(file)
--- 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
;; 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.
4 2004/11/06 21:39:58
espen Exp $
+;; $Id: genums.lisp,v 1.
5 2004/12/19 18:18:05
espen Exp $
(in-package "GLIB")
(in-package "GLIB")
@@
-118,7
+118,14
@@
(defbinding %enum-class-values () pointer
(defun query-enum-values (type)
(%query-enum-or-flags-values #'%enum-class-values '%enum-value type))
(defun query-enum-values (type)
(%query-enum-or-flags-values #'%enum-class-values '%enum-value type))
+(defun enum-int (enum type)
+ (funcall (to-alien-function type) enum))
+(defun int-enum (int type)
+ (funcall (from-alien-function type) int))
+
+(defun enum-mapping (type)
+ (rest (type-expand-to 'enum type)))
;;;; Generic flags type
;;;; Generic flags type