std::string typemap modifications so they can be used with %apply for other string classes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13120 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
49b6c39d98
commit
12a9671440
13 changed files with 37 additions and 33 deletions
|
|
@ -25,7 +25,7 @@ namespace std {
|
|||
$1.assign(STR0($input.u.string));
|
||||
}
|
||||
|
||||
%typemap(in, pikedesc="tStr") const string & (std::string temp) {
|
||||
%typemap(in, pikedesc="tStr") const string & ($*1_ltype temp) {
|
||||
if ($input.type != T_STRING)
|
||||
Pike_error("Bad argument: Expected a string.\n");
|
||||
temp.assign(STR0($input.u.string));
|
||||
|
|
@ -47,7 +47,7 @@ namespace std {
|
|||
throw Swig::DirectorTypeMismatchException("string expected");
|
||||
}
|
||||
|
||||
%typemap(directorout) const string & (std::string temp) {
|
||||
%typemap(directorout) const string & ($*1_ltype temp) {
|
||||
if ($input.type == T_STRING) {
|
||||
temp.assign(STR0($input.u.string));
|
||||
$result = &temp;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue