From: <wsf...@us...> - 2012-04-16 18:45:40
|
Revision: 12996 http://swig.svn.sourceforge.net/swig/?rev=12996&view=rev Author: wsfulton Date: 2012-04-16 18:45:33 +0000 (Mon, 16 Apr 2012) Log Message: ----------- Some test-suite fixes for visual studio Modified Paths: -------------- trunk/Examples/test-suite/director_binary_string.i trunk/Examples/test-suite/operator_pointer_ref.i trunk/Examples/test-suite/refcount.i trunk/Examples/test-suite/special_variable_macros.i Modified: trunk/Examples/test-suite/director_binary_string.i =================================================================== --- trunk/Examples/test-suite/director_binary_string.i 2012-04-15 22:47:38 UTC (rev 12995) +++ trunk/Examples/test-suite/director_binary_string.i 2012-04-16 18:45:33 UTC (rev 12996) @@ -29,12 +29,12 @@ void delCallback() { delete _callback; _callback = 0; } void setCallback(Callback *cb) { delCallback(); _callback = cb; } int call() { + int sum = 0; if (_callback) { char* aa = (char*)malloc(BUFFER_SIZE_AA); memset(aa, 9, BUFFER_SIZE_AA); char* bb = (char*)malloc(BUFFER_SIZE_BB); memset(bb, 13, BUFFER_SIZE_BB); - int sum = 0; _callback->run(aa, BUFFER_SIZE_AA, bb, BUFFER_SIZE_BB); for (int i = 0; i < BUFFER_SIZE_AA; i++) sum += aa[i]; @@ -42,8 +42,8 @@ sum += bb[i]; free(aa); free(bb); - return sum; } + return sum; } }; Modified: trunk/Examples/test-suite/operator_pointer_ref.i =================================================================== --- trunk/Examples/test-suite/operator_pointer_ref.i 2012-04-15 22:47:38 UTC (rev 12995) +++ trunk/Examples/test-suite/operator_pointer_ref.i 2012-04-16 18:45:33 UTC (rev 12996) @@ -1,5 +1,11 @@ %module operator_pointer_ref +%{ +#if defined(_MSC_VER) + #pragma warning(disable: 4996) // 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details. +#endif +%} + %rename(AsCharStarRef) operator char*&; %inline %{ Modified: trunk/Examples/test-suite/refcount.i =================================================================== --- trunk/Examples/test-suite/refcount.i 2012-04-15 22:47:38 UTC (rev 12995) +++ trunk/Examples/test-suite/refcount.i 2012-04-16 18:45:33 UTC (rev 12996) @@ -97,7 +97,7 @@ RCPtr<A> _a; }; -class B* global_create(A* a) +struct B* global_create(A* a) { return new B(a); } Modified: trunk/Examples/test-suite/special_variable_macros.i =================================================================== --- trunk/Examples/test-suite/special_variable_macros.i 2012-04-15 22:47:38 UTC (rev 12995) +++ trunk/Examples/test-suite/special_variable_macros.i 2012-04-16 18:45:33 UTC (rev 12996) @@ -5,6 +5,12 @@ %warnfilter(SWIGWARN_GO_NAME_CONFLICT); /* Ignoring 'NewName' due to Go name ('NewName') conflict with 'Name' */ +%{ +#if defined(_MSC_VER) + #pragma warning(disable: 4996) // 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details. +#endif +%} + %ignore Name::operator=; %inline %{ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |