Frank Buss's fix for anon enums.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8593 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
0c18f47955
commit
dafc4dbdfc
2 changed files with 40 additions and 11 deletions
|
|
@ -95,3 +95,17 @@
|
|||
|
||||
#include <string.h>
|
||||
%}
|
||||
|
||||
%insert("lisphead") %{
|
||||
;;;SWIG wrapper code starts here
|
||||
|
||||
(defmacro defanonenum (&body enums)
|
||||
"Converts anonymous enums to defconstants."
|
||||
`(progn ,@(loop for value in enums
|
||||
for index = 0 then (1+ index)
|
||||
when (listp value) do (setf index (second value)
|
||||
value (first value))
|
||||
collect `(defconstant ,value ,index))))
|
||||
|
||||
;;;SWIG wrapper code ends here
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue