From d0383257596f19d3270fd3f1444982e2beeb335f Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sun, 29 Jun 2003 21:54:44 +0000 Subject: [PATCH] Changed Swig_typemap_attach_kwargs to have global scope git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4934 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Swig/swig.h | 2 +- Source/Swig/typemap.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/Swig/swig.h b/Source/Swig/swig.h index e6fe63608..5a1897af3 100644 --- a/Source/Swig/swig.h +++ b/Source/Swig/swig.h @@ -473,7 +473,7 @@ extern String *Swig_typemap_lookup(const String_or_char *op, SwigType *type, Str String_or_char *source, String_or_char *target, Wrapper *f); extern String *Swig_typemap_lookup_new(const String_or_char *op, Node *n, const String_or_char *lname, Wrapper *f); - +extern void Swig_typemap_attach_kwargs(Hash *tm, const String_or_char *op, Parm *p); extern String *Swig_typemap_lookup_multi(const String_or_char *op, ParmList *parms, String_or_char *source, Wrapper *f, int *nmatch); extern void Swig_typemap_new_scope(); extern Hash *Swig_typemap_pop_scope(); diff --git a/Source/Swig/typemap.c b/Source/Swig/typemap.c index 0114d408f..ebd576db3 100644 --- a/Source/Swig/typemap.c +++ b/Source/Swig/typemap.c @@ -1206,9 +1206,12 @@ String *Swig_typemap_lookup_new(const String_or_char *op, Node *node, const Stri * If this hash (tm) contains a linked list of parameters under its "kwargs" * attribute, add keys for each of those named keyword arguments to this * parameter for later use. + * For example, attach the typemap attributes to p: + * %typemap(in, foo="xyz") ... + * A new attribute called "tmap:in:foo" with value "xyz" is attached to p. * ----------------------------------------------------------------------------- */ -static void +void Swig_typemap_attach_kwargs(Hash *tm, const String_or_char *op, Parm *p) { String *temp = NewString(""); Parm *kw = Getattr(tm,"kwargs");