Added STRING_OUT typemap test.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5494 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
9d0e20d4df
commit
5dfe42a6bc
2 changed files with 30 additions and 0 deletions
|
|
@ -7,6 +7,7 @@
|
|||
%apply char **STRING_ARRAY { char **get_names };
|
||||
%apply char **STRING_ARRAY { char **languages };
|
||||
%apply char *BYTE { char *chars };
|
||||
%apply char **STRING_OUT { char **string_ptr };
|
||||
|
||||
%{
|
||||
char *langs[] = { "Hungarian", "Afrikaans", "Norwegian", 0 };
|
||||
|
|
@ -41,5 +42,10 @@ void charout(char *chars) {
|
|||
sprintf(chars, "by jove");
|
||||
}
|
||||
|
||||
void char_ptr_ptr_out(char **string_ptr) {
|
||||
static char ret[] = "returned string";
|
||||
*string_ptr = ret;
|
||||
}
|
||||
|
||||
%}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue