diff --git a/SWIG/CHANGES.current b/SWIG/CHANGES.current index 9b5c3bf67..b2679651d 100644 --- a/SWIG/CHANGES.current +++ b/SWIG/CHANGES.current @@ -1,6 +1,12 @@ Version 1.3.22 (in progress) ================================== +08/03/2004: Ahmon Dancy + + [allegrocl] Additional case mode fixes. Also, make sure + foreign types are exported. + + 07/24/2004: mkoeppe [Guile] In -scm mode, SWIG modules now exchange their pointer type information via the Guile interpreter. It is no longer necessary to build a diff --git a/SWIG/Lib/allegrocl/allegrocl.swg b/SWIG/Lib/allegrocl/allegrocl.swg index 2a8abf1b7..73be29776 100644 --- a/SWIG/Lib/allegrocl/allegrocl.swg +++ b/SWIG/Lib/allegrocl/allegrocl.swg @@ -14,7 +14,7 @@ (defun identifier-convert-null (id &key type) (declare (ignore type)) - (intern id)) + (read-from-string id)) (defun identifier-convert-lispify (cname &key type) (assert (stringp cname)) @@ -42,7 +42,7 @@ else (push char res) (setf lastcase :other))) - (intern (coerce (nreverse res) 'string)))) + (read-from-string (coerce (nreverse res) 'string)))) (defmacro swig-defconstant (string value) (let ((symbol (funcall *swig-identifier-converter* string :type :constant))) @@ -57,7 +57,11 @@ (ff:def-foreign-call (,symbol ,name) ,@rest) (export (quote ,symbol)))))) - +(defmacro swig-def-foreign-type (name &rest rest) + (let ((symbol (funcall *swig-identifier-converter* name :type :type))) + `(eval-when (compile load eval) + (ff:def-foreign-type ,symbol ,@rest) + (export (quote ,symbol))))) ) ;; eval-when %} diff --git a/SWIG/Source/Modules/allegrocl.cxx b/SWIG/Source/Modules/allegrocl.cxx index f399b8b0b..50d7736df 100644 --- a/SWIG/Source/Modules/allegrocl.cxx +++ b/SWIG/Source/Modules/allegrocl.cxx @@ -360,10 +360,9 @@ int ALLEGROCL :: classDeclaration(Node *n) { Printf(stderr, " (name: %s)\n", name); SWIG_exit(EXIT_FAILURE); } - + Printf(f_cl, - "(ff:def-foreign-type #.(%s \"%s\" :type :type)\n (:struct\n", - identifier_converter, + "(swig-def-foreign-type \"%s\"\n (:struct\n", name); for (c=firstChild(n); c; c=nextSibling(c)) {