more swigkey unification

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8196 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-01-03 09:26:42 +00:00
commit 863961030d
9 changed files with 536 additions and 473 deletions

View file

@ -11,6 +11,7 @@
* ----------------------------------------------------------------------------- */
#include "swig.h"
#include "swigkeys.h"
#include <stdarg.h>
#include <assert.h>
@ -304,16 +305,16 @@ Swig_require(const char *ns, Node *n, ...) {
/* Save the view */
{
String *view = Getattr(n,"view");
String *view = Getattr(n,k_view);
if (view) {
if (Strcmp(view,ns) != 0) {
strcpy(temp,ns);
strcat(temp,":view");
Setattr(n,temp,view);
Setattr(n,"view",ns);
Setattr(n,k_view,ns);
}
} else {
Setattr(n,"view",ns);
Setattr(n,k_view,ns);
}
}
@ -358,16 +359,16 @@ Swig_save(const char *ns, Node *n, ...) {
/* Save the view */
{
String *view = Getattr(n,"view");
String *view = Getattr(n,k_view);
if (view) {
if (Strcmp(view,ns) != 0) {
strcpy(temp,ns);
strcat(temp,":view");
Setattr(n,temp,view);
Setattr(n,"view",ns);
Setattr(n,k_view,ns);
}
} else {
Setattr(n,"view",ns);
Setattr(n,k_view,ns);
}
}
@ -387,7 +388,7 @@ Swig_restore(Node *n) {
String *ns;
Iterator ki;
ns = Getattr(n,"view");
ns = Getattr(n,k_view);
assert(ns);
l = NewList();