php keyword fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7869 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
79d343470c
commit
3d786499d0
8 changed files with 16 additions and 17 deletions
|
|
@ -54,7 +54,7 @@
|
||||||
namespace B {
|
namespace B {
|
||||||
int CONST_NUM = 10;
|
int CONST_NUM = 10;
|
||||||
}
|
}
|
||||||
int function(int i = B::CONST_NUM) { return i; }
|
int afunction(int i = B::CONST_NUM) { return i; }
|
||||||
}
|
}
|
||||||
|
|
||||||
// references
|
// references
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ class Simple {};
|
||||||
// method tests
|
// method tests
|
||||||
%exception NS::SimpleNS::method() "_failed_ /*NS::Simple::method() const*/";
|
%exception NS::SimpleNS::method() "_failed_ /*NS::Simple::method() const*/";
|
||||||
%exception NS::SimpleNS::method() const "$action /*NS::Simple::method() const*/";
|
%exception NS::SimpleNS::method() const "$action /*NS::Simple::method() const*/";
|
||||||
%exception NS::SimpleNS::function() "$action /*NS::Simple::function()*/";
|
%exception NS::SimpleNS::afunction() "$action /*NS::Simple::afunction()*/";
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
namespace NS
|
namespace NS
|
||||||
|
|
@ -29,7 +29,7 @@ class Simple {};
|
||||||
class SimpleNS {
|
class SimpleNS {
|
||||||
public:
|
public:
|
||||||
void method() const {}
|
void method() const {}
|
||||||
void function() {}
|
void afunction() {}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,12 @@
|
||||||
// Ruby used to fail on the ordering of the two Class declarations below
|
// Ruby used to fail on the ordering of the two Class declarations below
|
||||||
|
|
||||||
struct Class {
|
struct Class {
|
||||||
int var;
|
int variable;
|
||||||
};
|
};
|
||||||
|
|
||||||
%{
|
%{
|
||||||
struct Class {
|
struct Class {
|
||||||
int var;
|
int variable;
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
struct Foo {
|
struct Foo {
|
||||||
int var;
|
int variable;
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
int test() { return -1; }
|
int test() { return -1; }
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -50,7 +50,7 @@ struct Foo {
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int var;
|
int variable;
|
||||||
} Bar;
|
} Bar;
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -285,6 +285,9 @@ inline const char* mangle ## #@__VA_ARGS__ () {
|
||||||
#ifdef SWIGRUBY
|
#ifdef SWIGRUBY
|
||||||
%rename(ddefined) defined;
|
%rename(ddefined) defined;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef SWIGPHP4
|
||||||
|
%rename(endif_) endif;
|
||||||
|
#endif
|
||||||
%inline %{
|
%inline %{
|
||||||
const int endif = 1;
|
const int endif = 1;
|
||||||
const int define = 1;
|
const int define = 1;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
%module template_ns_enum2
|
%module template_ns_enum2
|
||||||
|
|
||||||
#ifdef SWIGPERL
|
|
||||||
%rename(_eval) eval;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
|
|
||||||
namespace hi
|
namespace hi
|
||||||
|
|
@ -30,11 +26,11 @@
|
||||||
struct B
|
struct B
|
||||||
{
|
{
|
||||||
const traits<Hola>::value_type&
|
const traits<Hola>::value_type&
|
||||||
eval(const traits<Hola>::value_type& e) const;
|
evaluate(const traits<Hola>::value_type& e) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
const traits<Hola>::value_type&
|
const traits<Hola>::value_type&
|
||||||
B::eval(const traits<Hola>::value_type& e) const {
|
B::evaluate(const traits<Hola>::value_type& e) const {
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* This interface file tests whether whitespace in angle brackets
|
/* This interface file tests whether whitespace in angle brackets
|
||||||
effects the SWIG types. SF Bug #221917, reported by
|
affects the SWIG types. SF Bug #221917, reported by
|
||||||
burchanb@cs.tamu.edu. */
|
burchanb@cs.tamu.edu. */
|
||||||
|
|
||||||
%module template_whitespace
|
%module template_whitespace
|
||||||
|
|
@ -17,6 +17,6 @@ template<class T, class U> class map {
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
void foo(vector<int > v) {}
|
void foo(vector<int > v) {}
|
||||||
void var(vector<unsigned int> v) {}
|
void bar(vector<unsigned int> v) {}
|
||||||
void baz(map < int , int > p) {}
|
void baz(map < int , int > p) {}
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@ template<typename T> struct Base {
|
||||||
virtual IntegerPtr foxy() const = 0;
|
virtual IntegerPtr foxy() const = 0;
|
||||||
virtual IntegerPtr foxy(int a) const = 0;
|
virtual IntegerPtr foxy(int a) const = 0;
|
||||||
virtual int * foxy(int*& a) { return 0; }
|
virtual int * foxy(int*& a) { return 0; }
|
||||||
virtual double function() = 0;
|
virtual double afunction() = 0;
|
||||||
virtual IntegerPtr defaultargs(double d, int * a = 0) = 0;
|
virtual IntegerPtr defaultargs(double d, int * a = 0) = 0;
|
||||||
static void StaticHidden() {}
|
static void StaticHidden() {}
|
||||||
void AmIAmINotVirtual() {}
|
void AmIAmINotVirtual() {}
|
||||||
|
|
@ -169,7 +169,7 @@ template<typename T> struct Derived : Base<T> {
|
||||||
int * method() const { return 0; }
|
int * method() const { return 0; }
|
||||||
int * foxy(int a) const { return 0; }
|
int * foxy(int a) const { return 0; }
|
||||||
virtual int * foxy(int*& a) { return 0; }
|
virtual int * foxy(int*& a) { return 0; }
|
||||||
Double function() { return 0; }
|
Double afunction() { return 0; }
|
||||||
int * defaultargs(Double d, IntegerPtr a = 0) { return 0; }
|
int * defaultargs(Double d, IntegerPtr a = 0) { return 0; }
|
||||||
void AmIAmINotVirtual() {}
|
void AmIAmINotVirtual() {}
|
||||||
int * NotVirtual(int *i) { return 0; }
|
int * NotVirtual(int *i) { return 0; }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue