mirror of https://github.com/swig/swig
Cosmetic changes in a few test cases
This commit is contained in:
parent
209ed1db66
commit
18058a9860
|
@ -13,7 +13,7 @@
|
|||
|
||||
%feature("director");
|
||||
%feature("nodirector") Bravo::abs_method(); // ok
|
||||
%feature("director") Charlie::abs_method(); // okl
|
||||
%feature("director") Charlie::abs_method(); // ok
|
||||
%feature("nodirector") Delta::abs_method(); // ok
|
||||
|
||||
%inline %{
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
%module enum_missing
|
||||
|
||||
#if defined(SWIGSCILAB)
|
||||
%rename(AvCodecCtx) AVCodecContext;
|
||||
#endif
|
||||
|
||||
// Test when SWIG does not parse the enum definition
|
||||
%{
|
||||
enum AVPixelFormat {
|
||||
|
@ -18,10 +14,10 @@ enum AVPixelFormat2 {
|
|||
%}
|
||||
|
||||
%inline %{
|
||||
typedef struct AVCodecContext {
|
||||
typedef struct AVCodecCtx {
|
||||
enum AVPixelFormat pix_fmt;
|
||||
enum AVPixelFormat2 pix_fmt2;
|
||||
} AVCodecContext;
|
||||
} AVCodecCtx;
|
||||
|
||||
enum AVPixelFormat global_fmt;
|
||||
enum AVPixelFormat2 global_fmt2;
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
%module li_stdint
|
||||
|
||||
#if defined(SWIGSCILAB)
|
||||
%rename(StdI) StdInts;
|
||||
%rename(StdIf) StdIntFasts;
|
||||
%rename(StdIl) StdIntLeasts;
|
||||
#endif
|
||||
|
||||
%include <stdint.i>
|
||||
|
||||
%inline %{
|
||||
struct StdInts {
|
||||
struct StdI {
|
||||
int8_t int8_member;
|
||||
int16_t int16_member;
|
||||
int32_t int32_member;
|
||||
|
@ -29,7 +23,7 @@
|
|||
uint32_t uint32_td(int32_t i) { return i; }
|
||||
uint64_t uint64_td(int64_t i) { return i; }
|
||||
|
||||
struct StdIntFasts {
|
||||
struct StdIf {
|
||||
int_fast8_t int_fast8_member;
|
||||
int_fast16_t int_fast16_member;
|
||||
int_fast32_t int_fast32_member;
|
||||
|
@ -49,7 +43,7 @@
|
|||
uint_fast32_t uint_fast32_td(int_fast32_t i) { return i; }
|
||||
uint_fast64_t uint_fast64_td(int_fast64_t i) { return i; }
|
||||
|
||||
struct StdIntLeasts {
|
||||
struct StdIl {
|
||||
int_least8_t int_least8_member;
|
||||
int_least16_t int_least16_member;
|
||||
int_least32_t int_least32_member;
|
||||
|
|
|
@ -5,22 +5,16 @@ This testcase tests whether the sizeof operator on a pointer is working.
|
|||
%module sizeof_pointer
|
||||
|
||||
|
||||
#if defined(SWIGSCILAB)
|
||||
%rename(SizePtrTst) SizeofPointerTest;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
%inline %{
|
||||
|
||||
#define NO_PROBLEM sizeof(char)
|
||||
#define STAR_PROBLEM sizeof(char*)
|
||||
#define STAR_STAR_PROBLEM sizeof(char**)
|
||||
|
||||
typedef struct SizeofPointerTest {
|
||||
typedef struct SizePtrTst {
|
||||
unsigned char array1[NO_PROBLEM];
|
||||
unsigned char array2[STAR_PROBLEM];
|
||||
unsigned char array3[STAR_STAR_PROBLEM];
|
||||
} SizeofPointerTest;
|
||||
} SizePtrTst;
|
||||
|
||||
%}
|
||||
|
|
|
@ -12,12 +12,6 @@
|
|||
%warnfilter(SWIGWARN_PARSE_KEYWORD) Namespace;
|
||||
#endif
|
||||
|
||||
#ifdef SWIGSCILAB
|
||||
%inline %{
|
||||
#undef Error
|
||||
%}
|
||||
#endif
|
||||
|
||||
// Tests SWIG's automatic exception mechanism
|
||||
|
||||
%inline %{
|
||||
|
|
|
@ -29,12 +29,7 @@ typedef union {
|
|||
SmallStruct ss;
|
||||
} UnionTest;
|
||||
|
||||
%}
|
||||
|
||||
/* This union checks the parser and will be used in a runtime test */
|
||||
|
||||
%inline %{
|
||||
|
||||
typedef struct {
|
||||
union
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue