more fixes/tests for empty strings
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9083 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8947229522
commit
eb5053c631
6 changed files with 80 additions and 3 deletions
|
|
@ -127,3 +127,23 @@ public:
|
|||
|
||||
};
|
||||
%}
|
||||
|
||||
%inline %{
|
||||
std::string empty() {
|
||||
return std::string();
|
||||
}
|
||||
|
||||
char *c_empty() {
|
||||
return "";
|
||||
}
|
||||
|
||||
char *c_null() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *get_null(const char *a) {
|
||||
return a == 0 ? a : "non-null";
|
||||
}
|
||||
|
||||
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue