add setter into test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6971 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b33ec1cc24
commit
2cdf0a051f
2 changed files with 11 additions and 5 deletions
|
|
@ -8,12 +8,12 @@
|
|||
%apply char **STRING_ARRAY { char **languages };
|
||||
%apply char *BYTE { char *chars };
|
||||
%apply char **STRING_OUT { char **string_ptr };
|
||||
%typemap(freearg) char **languages "" // don't delete memory when setting global variable
|
||||
|
||||
%{
|
||||
char *langs[] = { (char *)"Hungarian", (char *)"Afrikaans", (char *)"Norwegian", NULL };
|
||||
%}
|
||||
|
||||
%immutable languages; /* TODO: fix, because there is a problem with setters */
|
||||
%inline %{
|
||||
char **languages = &langs[0];
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue