char *& typemaps added
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10295 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c99fe90574
commit
2cf3cb3dc9
6 changed files with 82 additions and 12 deletions
|
|
@ -137,3 +137,22 @@ const char global_const_char_array2[sizeof(CPLUSPLUS_MSG)+1] = CPLUSPLUS_MSG;
|
|||
|
||||
|
||||
}
|
||||
|
||||
|
||||
%inline %{
|
||||
|
||||
// char *& tests
|
||||
const char *&GetConstCharPointerRef() {
|
||||
static const char str[] = CPLUSPLUS_MSG;
|
||||
static const char *ptr = str;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
bool SetConstCharPointerRef(const char *&str, unsigned int number) {
|
||||
static char static_str[] = CPLUSPLUS_MSG;
|
||||
strcpy(static_str, str);
|
||||
return check(static_str, number);
|
||||
}
|
||||
|
||||
%}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue