Fixes to support %constant strings defined by other variables or preprocessor

defines such as:
#define STR "a constant string"
%constant char *ConstantValue = STR;


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7600 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Kevin Ruland 2005-10-07 01:18:29 +00:00
commit 3959f9cfda
2 changed files with 3 additions and 2 deletions

View file

@ -893,7 +893,8 @@ public:
String *name = Getattr(n,"name");
String *iname = Getattr(n,"sym:name");
SwigType *type = Getattr(n,"type");
String *value = Getattr(n,"value");
String *rawval = Getattr(n,"rawval");
String *value = rawval ? rawval : Getattr(n,"value");
String *tm;
if (!addSymbol(iname,n)) return SWIG_ERROR;