Permalink
Browse files

Add cast to test 'string_simple' to avoid C++ compiler error.

  • Loading branch information...
1 parent 3667986 commit 093f8995a8e95b8867e75f392cb2c0d49ff6d05c @oliver---- oliver---- committed Apr 22, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 Examples/test-suite/string_simple.i
View
2 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;
}

0 comments on commit 093f899

Please sign in to comment.