In many of the .i files I see this bit of code in the lispheader:

   ;;; Macro to handle defenum (thanks to Frank Buss for this
   ;;; SWIG/CFFI feature) this handles anonymous enum types differently

   (defmacro defenum (&body enums)      
    `(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))))

So I put it in my own .i file (playing with swigifying Fast Events lib). 
  However in the generated .lisp file I get that definition of DEFENUM 
but also this, seemingly identical definition of DEFANONENUM?

   ;;;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))))

Did Frank's macro get folded into SWIG proper? And, now I just did some 
grepping and don't see any DEFENUM or DEFANONENUM forms in any of the 
.lisp files in the svn tree? Is this not used at all anyway? Could we 
take it out of the .i files? If so, I'll be happy to provide a patch 
that does it.

-Peter

-- 
Peter Seibel            :  [EMAIL PROTECTED]
Gigamonkeys Consulting  :  http://www.gigamonkeys.com/
_______________________________________________
application-builder mailing list
[email protected]
http://www.lispniks.com/mailman/listinfo/application-builder

Reply via email to