php keyword fixes

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7869 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-11-26 08:38:49 +00:00
commit 473da5b297
8 changed files with 16 additions and 17 deletions

View file

@ -54,7 +54,7 @@
namespace B {
int CONST_NUM = 10;
}
int function(int i = B::CONST_NUM) { return i; }
int afunction(int i = B::CONST_NUM) { return i; }
}
// references

View file

@ -20,7 +20,7 @@ class Simple {};
// method tests
%exception NS::SimpleNS::method() "_failed_ /*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 %{
namespace NS
@ -29,7 +29,7 @@ class Simple {};
class SimpleNS {
public:
void method() const {}
void function() {}
void afunction() {}
};
}

View file

@ -3,12 +3,12 @@
// Ruby used to fail on the ordering of the two Class declarations below
struct Class {
int var;
int variable;
};
%{
struct Class {
int var;
int variable;
};
%}

View file

@ -22,7 +22,7 @@
%inline %{
struct Foo {
int var;
int variable;
#ifdef __cplusplus
int test() { return -1; }
#endif
@ -50,7 +50,7 @@ struct Foo {
%inline %{
typedef struct {
int var;
int variable;
} Bar;
%}

View file

@ -285,6 +285,9 @@ inline const char* mangle ## #@__VA_ARGS__ () {
#ifdef SWIGRUBY
%rename(ddefined) defined;
#endif
#ifdef SWIGPHP4
%rename(endif_) endif;
#endif
%inline %{
const int endif = 1;
const int define = 1;

View file

@ -1,9 +1,5 @@
%module template_ns_enum2
#ifdef SWIGPERL
%rename(_eval) eval;
#endif
%inline %{
namespace hi
@ -30,11 +26,11 @@
struct B
{
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&
B::eval(const traits<Hola>::value_type& e) const {
B::evaluate(const traits<Hola>::value_type& e) const {
return e;
}
}

View file

@ -1,5 +1,5 @@
/* 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. */
%module template_whitespace
@ -17,6 +17,6 @@ template<class T, class U> class map {
%inline %{
void foo(vector<int > v) {}
void var(vector<unsigned int> v) {}
void bar(vector<unsigned int> v) {}
void baz(map < int , int > p) {}
%}

View file

@ -153,7 +153,7 @@ template<typename T> struct Base {
virtual IntegerPtr foxy() const = 0;
virtual IntegerPtr foxy(int a) const = 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;
static void StaticHidden() {}
void AmIAmINotVirtual() {}
@ -169,7 +169,7 @@ template<typename T> struct Derived : Base<T> {
int * method() const { return 0; }
int * foxy(int a) const { 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; }
void AmIAmINotVirtual() {}
int * NotVirtual(int *i) { return 0; }