scons: Require SWIG >= 2.0.4 and remove vector typemaps
SWIG commit fd666c1 (*) made it unnecessary for gem5 to have these
typemaps to handle Vector types.
* fd666c1440
This commit is contained in:
@@ -299,26 +299,6 @@ class VectorParamDesc(ParamDesc):
|
||||
ptype = self.ptype_str
|
||||
cxx_type = self.ptype.cxx_type
|
||||
|
||||
code('''\
|
||||
%typemap(in) std::vector< $cxx_type >::value_type {
|
||||
if (SWIG_ConvertPtr($$input, (void **)&$$1, $$1_descriptor, 0) == -1) {
|
||||
if (SWIG_ConvertPtr($$input, (void **)&$$1,
|
||||
$$descriptor($cxx_type), 0) == -1) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
%typemap(in) std::vector< $cxx_type >::value_type * {
|
||||
if (SWIG_ConvertPtr($$input, (void **)&$$1, $$1_descriptor, 0) == -1) {
|
||||
if (SWIG_ConvertPtr($$input, (void **)&$$1,
|
||||
$$descriptor($cxx_type *), 0) == -1) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
''')
|
||||
|
||||
code('%template(vector_$ptype) std::vector< $cxx_type >;')
|
||||
|
||||
def cxx_predecls(self, code):
|
||||
|
||||
Reference in New Issue
Block a user