fix bug 953142
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6373 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
7346e7eaf2
commit
1d1b75d98f
2 changed files with 3 additions and 1 deletions
|
|
@ -11,5 +11,5 @@
|
|||
|
||||
#define ESC_CONST '\1'
|
||||
#define NULL_CONST '\0'
|
||||
|
||||
#define SPECIALCHAR 'á'
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ char cvsroot_misc_c[] = "$Header$";
|
|||
|
||||
#include "swig.h"
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Swig_copy_string()
|
||||
|
|
@ -80,6 +81,7 @@ String *Swig_string_escape(String *s) {
|
|||
} else if (c == ' ') {
|
||||
Putc(c,ns);
|
||||
} else if (!isgraph(c)) {
|
||||
if (c < 0) c += UCHAR_MAX +1;
|
||||
Printf(ns,"\\%o", c);
|
||||
} else {
|
||||
Putc(c,ns);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue