From be61c5347bb5c57541c8eba248b8a0d3668e8d08 Mon Sep 17 00:00:00 2001 From: Mikel Bancroft Date: Tue, 7 Nov 2006 19:34:18 +0000 Subject: [PATCH] [allegrocl] see CHANGES.current. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9528 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- CHANGES.current | 6 ++++++ Lib/allegrocl/allegrocl.swg | 4 ++-- Source/Modules/allegrocl.cxx | 7 ++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGES.current b/CHANGES.current index 06cf2b6fc..64627cbc7 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -1,6 +1,12 @@ Version 1.3.30 (in progress) =========================== +11/07/2006: mutandiz + [allegrocl] + allegrocl.swg: swig-defvar updated to allow specifying of + non-default foreign type (via :ftype keyword arg). + allegrocl.cxx: Specify proper access type for enum values. + 11/03/2006: wsfulton [Java/C#] Fix const std::string& return types for directors as reported by Mark Donselzmann diff --git a/Lib/allegrocl/allegrocl.swg b/Lib/allegrocl/allegrocl.swg index 9a04559c8..caf46c651 100644 --- a/Lib/allegrocl/allegrocl.swg +++ b/Lib/allegrocl/allegrocl.swg @@ -504,10 +504,10 @@ $body)" `(cl::eval-when (compile load eval) (cl::in-package ,(package-name-for-namespace namespace)))) -(defswig2 swig-defvar (name mangled-name &key type) +(defswig2 swig-defvar (name mangled-name &key type (ftype :unsigned-natural)) (cl::let ((symbol (id-convert-and-export name :type type))) `(cl::eval-when (compile load eval) - (ff:def-foreign-variable (,symbol ,mangled-name))))) + (ff:def-foreign-variable (,symbol ,mangled-name) :type ,ftype)))) ) ;; eval-when diff --git a/Source/Modules/allegrocl.cxx b/Source/Modules/allegrocl.cxx index 10af6e93f..4c9e2895f 100644 --- a/Source/Modules/allegrocl.cxx +++ b/Source/Modules/allegrocl.cxx @@ -1353,9 +1353,9 @@ void emit_enum_type(Node *n) { // walk children. Node *c; - for (c = firstChild(n); c; c = nextSibling(c)) { - String *mangled_name = mangle_name(c, "ACL_ENUM", Getattr(c, "allegrocl:package")); - Printf(f_clhead, "(swig-defvar \"%s\" \"%s\" :type :constant)\n", Getattr(c, "sym:name"), mangled_name); + for(c = firstChild(n); c; c=nextSibling(c)) { + String *mangled_name = mangle_name(c, "ACL_ENUM", Getattr(c,"allegrocl:package")); + Printf(f_clhead, "(swig-defvar \"%s\" \"%s\" :type :constant :ftype :signed-long)\n", Getattr(c, "sym:name"), mangled_name); Delete(mangled_name); } } @@ -2129,6 +2129,7 @@ IDargs *id_converter_arguments(Node *n) { result->arity = NewStringf("%d", // emit_num_arguments(Getattr(n, "wrap:parms"))); emit_num_lin_arguments(Getattr(n, "wrap:parms"))); + Printf(stderr, "got arity of '%s' node '%s' '%x'\n", result->arity, Getattr(n,"name"), Getattr(n,"wrap:parms")); } SetVoid(n, "allegrocl:id-converter-args", result);