Changed internal handling of string literals. Added new typemap specification syntax with strings.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@704 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
108fd6f5b6
commit
b746069e7d
10 changed files with 219 additions and 107 deletions
|
|
@ -301,6 +301,16 @@ DohvPrintf(DOH *so, const char *format, va_list ap)
|
|||
}
|
||||
} else {
|
||||
if (!doh) doh = "";
|
||||
|
||||
if (strlen(encoder)) {
|
||||
DOH *s = NewString(doh);
|
||||
Seek(s,0, SEEK_SET);
|
||||
enc = encode(encoder,s);
|
||||
Delete(s);
|
||||
doh = Char(enc);
|
||||
} else {
|
||||
enc = 0;
|
||||
}
|
||||
maxwidth = maxwidth+strlen(newformat)+strlen((char *) doh);
|
||||
*(fmt++) = 's';
|
||||
*fmt = 0;
|
||||
|
|
@ -314,6 +324,7 @@ DohvPrintf(DOH *so, const char *format, va_list ap)
|
|||
if (stemp != obuffer) {
|
||||
DohFree(stemp);
|
||||
}
|
||||
if (enc) Delete(enc);
|
||||
}
|
||||
} else {
|
||||
*(fmt++) = *p;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue