diff options
author | Oliver Buchtala <oliver.buchtala@googlemail.com> | 2014-04-23 00:38:45 +0200 |
---|---|---|
committer | Oliver Buchtala <oliver.buchtala@googlemail.com> | 2014-04-23 00:38:45 +0200 |
commit | 093f8995a8e95b8867e75f392cb2c0d49ff6d05c (patch) | |
tree | bbb33b5c295d244eb0df2ce4e50ff29cf04a70cc /Examples/test-suite | |
parent | 36679865f42d8e3bc0ecb2fd1503609b2e2f522c (diff) | |
download | swig-093f8995a8e95b8867e75f392cb2c0d49ff6d05c.tar.gz |
Add cast to test 'string_simple' to avoid C++ compiler error.
Diffstat (limited to 'Examples/test-suite')
-rw-r--r-- | Examples/test-suite/string_simple.i | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Examples/test-suite/string_simple.i b/Examples/test-suite/string_simple.i index 5f5cc00bb..c319aa1ef 100644 --- a/Examples/test-suite/string_simple.i +++ b/Examples/test-suite/string_simple.i @@ -6,7 +6,7 @@ #include <string.h> const char* copy_string(const char* str) { size_t len = strlen(str); - char* newstring = malloc(len + 1); + char* newstring = (char*) malloc(len + 1); strcpy(newstring, str); return newstring; } |