diff --git a/CHANGES.current b/CHANGES.current index e7d0370a7..6b2c137c1 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -1,6 +1,16 @@ Version 1.3.22 (in progress) ================================== +05/03/2004: dancy (Ahmon Dancy) + + * Lib/allegrocl/allegrocl.swg: Updated comments about identifer + conversion. + + * Sources/Modules/allegorcl.cxx: Register /dev/null for "header" + target. Also, disregard "const" qualifiers during type + conversion. + + 05/02/2004: wuzzeb (John Lenz) [Chicken] Fix bug 782468. To fix this bug, the runtime code has been rewritten, and diff --git a/Lib/allegrocl/allegrocl.swg b/Lib/allegrocl/allegrocl.swg index bf6f402d7..4b18828fe 100644 --- a/Lib/allegrocl/allegrocl.swg +++ b/Lib/allegrocl/allegrocl.swg @@ -1,17 +1,15 @@ %wrapper %{ -;; allegrocl.swg ;; $Id$ (eval-when (compile eval) - ;; Customize this (in your swig interface definition file, not here) - ;; if you want to change how the name is defined in Lisp. This - ;; function will be called at least twice per symbol, so keep this - ;; in mind if your customized function has side effects. - - (defun identifier-convert-null (id &key type) - (declare (ignore type)) - (intern id)) +;;; You can define your own identifier converter if you want. +;;; Use the -identifier-converter command line argument to +;;; specify its name. + +(defun identifier-convert-null (id &key type) + (declare (ignore type)) + (intern id)) (defun identifier-convert-lispify (cname &key type) (assert (stringp cname)) @@ -43,5 +41,5 @@ - ) ;; eval-when +) ;; eval-when %} diff --git a/Source/Modules/allegrocl.cxx b/Source/Modules/allegrocl.cxx index 32f408cd7..537ce1fab 100644 --- a/Source/Modules/allegrocl.cxx +++ b/Source/Modules/allegrocl.cxx @@ -1,5 +1,7 @@ #include "swigmod.h" +;; $Id$ + class ALLEGROCL : public Language { public: @@ -12,6 +14,7 @@ public: }; static File *f_cl=0; +static File *f_null=0; char *identifier_converter="identifier-convert-null"; @@ -106,10 +109,16 @@ void add_defined_foreign_type(String *type) { String *convert_type(SwigType *ty) { - char *type_reduced=Char(SwigType_typedef_resolve_all(ty)); + SwigType *tr=SwigType_typedef_resolve_all(ty); + char *type_reduced=Char(tr); int i; //Printf(stdout,"convert_type %s\n", ty); + if (SwigType_isconst(tr)) { + SwigType_pop(tr); + type_reduced=Char(tr); + } + if (SwigType_ispointer(type_reduced) || SwigType_isarray(ty) || !strncmp(type_reduced, "p.f", 3)) { @@ -148,6 +157,9 @@ void ALLEGROCL :: main(int argc, char *argv[]) { SWIG_library_directory("allegrocl"); SWIG_config_file("allegrocl.swg"); + + + for(i=1; i