Fixed type_name of some std classes.
Remove cmp_id from GC_VALUE. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9784 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
949b6238e8
commit
c18feb2af3
4 changed files with 12 additions and 14 deletions
|
|
@ -84,7 +84,6 @@ namespace swig {
|
|||
protected:
|
||||
VALUE _obj;
|
||||
|
||||
static ID cmp_id;
|
||||
static ID hash_id;
|
||||
static ID lt_id;
|
||||
static ID gt_id;
|
||||
|
|
@ -177,9 +176,10 @@ namespace swig {
|
|||
}
|
||||
|
||||
|
||||
#define GC_VALUE_CMP( op_id, op, cmp ) \
|
||||
#define GC_VALUE_CMP( op_id, op, cmp, cmpval ) \
|
||||
bool op( const GC_VALUE& other ) const \
|
||||
{ \
|
||||
bool res = false; \
|
||||
VALUE ret = Qnil; \
|
||||
SWIG_RUBY_THREAD_BEGIN_BLOCK; \
|
||||
if ( rb_respond_to( _obj, op_id ) == Qtrue ) \
|
||||
|
|
@ -193,7 +193,6 @@ namespace swig {
|
|||
ret = rb_protect( PROTECTFUNC(swig_protect_funcall), VALUE(&args), \
|
||||
&status ); \
|
||||
} \
|
||||
bool res = false; \
|
||||
if ( ret == Qnil ) { \
|
||||
VALUE a = rb_funcall( _obj, hash_id, 0 ); \
|
||||
VALUE b = rb_funcall( VALUE(other), hash_id, 0 ); \
|
||||
|
|
@ -208,11 +207,11 @@ namespace swig {
|
|||
}
|
||||
|
||||
|
||||
GC_VALUE_CMP( eq_id, operator==, == )
|
||||
GC_VALUE_CMP( lt_id, operator<, < )
|
||||
GC_VALUE_CMP( le_id, operator<=, <= )
|
||||
GC_VALUE_CMP( gt_id, operator>, > )
|
||||
GC_VALUE_CMP( ge_id, operator>=, >= )
|
||||
GC_VALUE_CMP( eq_id, operator==, ==, == 0 )
|
||||
GC_VALUE_CMP( lt_id, operator<, < , < 0 )
|
||||
GC_VALUE_CMP( le_id, operator<=, <=, <= 0 )
|
||||
GC_VALUE_CMP( gt_id, operator>, > , > 0 )
|
||||
GC_VALUE_CMP( ge_id, operator>=, >=, >= 0 )
|
||||
#undef GC_VALUE_CMP
|
||||
|
||||
bool operator!=( const GC_VALUE& other )
|
||||
|
|
@ -275,7 +274,6 @@ namespace swig {
|
|||
|
||||
};
|
||||
|
||||
ID GC_VALUE::cmp_id = rb_intern("<=>");
|
||||
ID GC_VALUE::hash_id = rb_intern("hash");
|
||||
ID GC_VALUE::lt_id = rb_intern("<");
|
||||
ID GC_VALUE::gt_id = rb_intern(">");
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ namespace std {
|
|||
template <> struct traits<std::multiset<_Key, _Compare, _Alloc > > {
|
||||
typedef pointer_category category;
|
||||
static const char* type_name() {
|
||||
return "std::multiset<" #_Key "," #_Alloc " >";
|
||||
return "std::multiset<" #_Key "," #_Compare "," #_Alloc " >";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ namespace std {
|
|||
template <> struct traits<std::queue<_Tp, _Sequence > > {
|
||||
typedef pointer_category category;
|
||||
static const char* type_name() {
|
||||
return "std::queue<" #_Tp " >";
|
||||
return "std::queue<" #_Tp "," #_Sequence " >";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -109,7 +109,7 @@ namespace std {
|
|||
template <> struct traits<std::queue<_Tp*, _Sequence > > {
|
||||
typedef value_category category;
|
||||
static const char* type_name() {
|
||||
return "std::queue<" #_Tp " * >";
|
||||
return "std::queue<" #_Tp "," #_Sequence " * >";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ namespace std {
|
|||
template <> struct traits<std::stack<_Tp, _Sequence > > {
|
||||
typedef pointer_category category;
|
||||
static const char* type_name() {
|
||||
return "std::stack<" #_Tp " >";
|
||||
return "std::stack<" #_Tp "," #_Sequence " >";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -108,7 +108,7 @@ namespace std {
|
|||
template <> struct traits<std::stack<_Tp*, _Sequence > > {
|
||||
typedef value_category category;
|
||||
static const char* type_name() {
|
||||
return "std::stack<" #_Tp " * >";
|
||||
return "std::stack<" #_Tp "," #_Sequence " * >";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue