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:
William S Fulton 2005-02-17 22:23:37 +00:00
commit 2cdf0a051f
2 changed files with 11 additions and 5 deletions

View file

@ -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];
%}