mirror of https://github.com/swig/swig
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:
parent
35b2270f84
commit
f9e85bb27f
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -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 %{
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
RCPtr<A> _a;
|
||||
};
|
||||
|
||||
class B* global_create(A* a)
|
||||
struct B* global_create(A* a)
|
||||
{
|
||||
return new B(a);
|
||||
}
|
||||
|
|
|
@ -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 %{
|
||||
|
|
Loading…
Reference in New Issue