diff --git a/src/svalue.c b/src/svalue.c index 8e28cd5e186e27f31390c4b55bf2a43b0484335e..371d80194a46ddc9b6567092dbca6e915be2666d 100644 --- a/src/svalue.c +++ b/src/svalue.c @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: svalue.c,v 1.244 2008/06/29 11:11:38 nilsson Exp $ +|| $Id: svalue.c,v 1.245 2008/07/02 10:43:37 mast Exp $ */ #include "global.h" @@ -1263,15 +1263,16 @@ PMOD_EXPORT void describe_svalue(const struct svalue *s,int indent,struct proces case T_STRING: { - int i; + struct pike_string *str = s->u.string; + int i, len = str->len; my_putchar('"'); - for(i=0; i < s->u.string->len; i++) + for(i=0; i < len; i++) { - unsigned j; - switch(j = index_shared_string(s->u.string,i)) + p_wchar2 j; + switch(j = index_shared_string(str,i)) { case '\n': - if (i == s->u.string->len-1) { + if (i == len-1) { /* String ends with a new-line. */ my_strcat("\\n"); } else { @@ -1358,7 +1359,6 @@ PMOD_EXPORT void describe_svalue(const struct svalue *s,int indent,struct proces } break; - case T_FUNCTION: if(s->subtype == FUNCTION_BUILTIN) {