Some test-suite fixes for visual studio

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12996 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2012-04-16 18:45:33 +00:00
parent 35b2270f84
commit f9e85bb27f
4 changed files with 15 additions and 3 deletions

View File

@ -29,12 +29,12 @@ public:
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 @@ public:
sum += bb[i];
free(aa);
free(bb);
return sum;
}
return sum;
}
};

View File

@ -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 %{

View File

@ -97,7 +97,7 @@
RCPtr<A> _a;
};
class B* global_create(A* a)
struct B* global_create(A* a)
{
return new B(a);
}

View File

@ -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 %{