mirror of https://github.com/swig/swig
Prefer testcase code over build system code for C testcases
This commit is contained in:
parent
a5576af6d1
commit
07ce064814
|
@ -99,7 +99,7 @@ FAILING_CPP_TESTS := \
|
|||
|
||||
# Ignore warnings about failing to apply typemaps because none are defined:
|
||||
# usually there is no need for special typemaps in C.
|
||||
char_binary.cpptest director_binary_string.cpptest li_typemaps.cpptest li_typemaps_apply.cpptest long_long_apply.cpptest: SWIGOPT += -w453
|
||||
li_typemaps.cpptest li_typemaps_apply.cpptest long_long_apply.cpptest: SWIGOPT += -w453
|
||||
|
||||
include $(srcdir)/../common.mk
|
||||
|
||||
|
|
|
@ -4,8 +4,11 @@ A test case for testing non null terminated char pointers.
|
|||
|
||||
%module char_binary
|
||||
|
||||
#if !defined(SWIGC)
|
||||
/* There is no concept of a higher level binary string in C */
|
||||
%apply (char *STRING, size_t LENGTH) { (const char *str, size_t len) }
|
||||
%apply (char *STRING, size_t LENGTH) { (const unsigned char *str, size_t len) }
|
||||
#endif
|
||||
|
||||
%inline %{
|
||||
struct Test {
|
||||
|
|
|
@ -2,9 +2,12 @@
|
|||
|
||||
%feature("director") Callback;
|
||||
|
||||
#if !defined(SWIGC)
|
||||
/* There is no concept of a higher level binary string in C */
|
||||
%apply (char *STRING, size_t LENGTH) { (char *dataBufferAA, int sizeAA) };
|
||||
%apply (char *STRING, size_t LENGTH) { (char *dataBufferBB, int sizeBB) };
|
||||
%apply (const char *STRING, size_t LENGTH) { (const char *data, size_t datalen) };
|
||||
#endif
|
||||
|
||||
%inline %{
|
||||
#include <stdlib.h>
|
||||
|
|
Loading…
Reference in New Issue