Fix STL wrappers to not generate <: digraphs.
For example std::vector<::X::Y> was sometimes generated, now corrected to std::vector< ::X::Y >.
This commit is contained in:
parent
625a405b8e
commit
6b4e57245d
33 changed files with 339 additions and 303 deletions
|
|
@ -13,17 +13,17 @@
|
|||
fragment=SWIG_From_frag(Type),
|
||||
fragment="StdTraits") {
|
||||
namespace swig {
|
||||
template <> struct traits<Type > {
|
||||
template <> struct traits< Type > {
|
||||
typedef value_category category;
|
||||
static const char* type_name() { return #Type; }
|
||||
};
|
||||
template <> struct traits_asval<Type > {
|
||||
};
|
||||
template <> struct traits_asval< Type > {
|
||||
typedef Type value_type;
|
||||
static int asval(PyObject *obj, value_type *val) {
|
||||
static int asval(PyObject *obj, value_type *val) {
|
||||
return SWIG_AsVal(Type)(obj, val);
|
||||
}
|
||||
};
|
||||
template <> struct traits_from<Type > {
|
||||
template <> struct traits_from< Type > {
|
||||
typedef Type value_type;
|
||||
static PyObject *from(const value_type& val) {
|
||||
return SWIG_From(Type)(val);
|
||||
|
|
@ -46,13 +46,13 @@ namespace swig {
|
|||
fragment=SWIG_From_frag(int),
|
||||
fragment="StdTraits") {
|
||||
namespace swig {
|
||||
template <> struct traits_asval<Type > {
|
||||
template <> struct traits_asval< Type > {
|
||||
typedef Type value_type;
|
||||
static int asval(PyObject *obj, value_type *val) {
|
||||
static int asval(PyObject *obj, value_type *val) {
|
||||
return SWIG_AsVal(int)(obj, (int *)val);
|
||||
}
|
||||
};
|
||||
template <> struct traits_from<Type > {
|
||||
template <> struct traits_from< Type > {
|
||||
typedef Type value_type;
|
||||
static PyObject *from(const value_type& val) {
|
||||
return SWIG_From(int)((int)val);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue