From 9c7d0143896cee19ef704dd194ba8226cf2dc0ca Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Thu, 17 Oct 2013 18:36:59 +0100 Subject: [PATCH] T_STRING is now const char * instead of char * Fixes Guile constant wrappers removing -Wwrite-strings g++ warning. --- Source/Modules/guile.cxx | 2 +- Source/Swig/stype.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Modules/guile.cxx b/Source/Modules/guile.cxx index e0a084583..2c48ba319 100644 --- a/Source/Modules/guile.cxx +++ b/Source/Modules/guile.cxx @@ -1350,7 +1350,7 @@ public: Printv(f_header, tm, "\n", NIL); } else { // Create variable and assign it a value - Printf(f_header, "static %s = %s;\n", SwigType_lstr(nctype, var_name), rvalue); + Printf(f_header, "static %s = %s;\n", SwigType_str(type, var_name), rvalue); } { /* Hack alert: will cleanup later -- Dave */ diff --git a/Source/Swig/stype.c b/Source/Swig/stype.c index 4b72bdaa2..506878799 100644 --- a/Source/Swig/stype.c +++ b/Source/Swig/stype.c @@ -131,6 +131,7 @@ SwigType *NewSwigType(int t) { break; case T_STRING: { SwigType *t = NewString("char"); + SwigType_add_qualifier(t, "const"); SwigType_add_pointer(t); return t; break;