typemap name changes:
inv => directorin outv => directorout argoutv => directorargout git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5137 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
20fabf7ff3
commit
7ee01311b2
24 changed files with 500 additions and 501 deletions
|
|
@ -115,7 +115,7 @@ swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
|
|||
statichere PyTypeObject varlinktype = {
|
||||
PyObject_HEAD_INIT(0)
|
||||
0,
|
||||
(char *)"swigvarlink", /* Type name */
|
||||
(char *)"swigvarlink", /* Type name */
|
||||
sizeof(swig_varlinkobject), /* Basic size */
|
||||
0, /* Itemsize */
|
||||
0, /* Deallocator */
|
||||
|
|
@ -143,8 +143,7 @@ SWIG_newvarlink(void) {
|
|||
}
|
||||
|
||||
SWIGRUNTIME(void)
|
||||
SWIG_addvarlink(PyObject *p, char *name,
|
||||
PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
|
||||
SWIG_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
|
||||
swig_varlinkobject *v;
|
||||
swig_globalvar *gv;
|
||||
v= (swig_varlinkobject *) p;
|
||||
|
|
@ -277,7 +276,7 @@ type_error:
|
|||
if (flags & SWIG_POINTER_EXCEPTION) {
|
||||
if (ty && c) {
|
||||
char *temp = (char *) malloc(64+strlen(ty->name)+strlen(c));
|
||||
sprintf(temp,"Type error. Got %s, expected %s", c, ty->name);
|
||||
sprintf(temp,"Type error. Got %s, expected %s", c, ty->name);
|
||||
PyErr_SetString(PyExc_TypeError, temp);
|
||||
free((char *) temp);
|
||||
} else {
|
||||
|
|
@ -310,7 +309,7 @@ type_error:
|
|||
if (flags) {
|
||||
if (ty && c) {
|
||||
char *temp = (char *) malloc(64+strlen(ty->name)+strlen(c));
|
||||
sprintf(temp,"Type error. Got %s, expected %s", c, ty->name);
|
||||
sprintf(temp,"Type error. Got %s, expected %s", c, ty->name);
|
||||
PyErr_SetString(PyExc_TypeError, temp);
|
||||
free((char *) temp);
|
||||
} else {
|
||||
|
|
@ -349,9 +348,9 @@ SWIG_NewPointerObj(void *ptr, swig_type_info *type, int own) {
|
|||
Py_DECREF(args);
|
||||
if (inst) {
|
||||
if (own) {
|
||||
PyObject *n = PyInt_FromLong(1);
|
||||
PyObject_SetAttrString(inst,(char*)"thisown",n);
|
||||
Py_DECREF(n);
|
||||
PyObject *n = PyInt_FromLong(1);
|
||||
PyObject_SetAttrString(inst,(char*)"thisown",n);
|
||||
Py_DECREF(n);
|
||||
}
|
||||
robj = inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
%typemap(in,parse="b") signed char "";
|
||||
|
||||
%typemap(in) unsigned int, unsigned short, unsigned long, unsigned char
|
||||
"$1 = ($1_ltype) PyInt_AsLong($input);
|
||||
"$1 = ($1_ltype) PyInt_AsLong($input);
|
||||
if (PyErr_Occurred()) SWIG_fail;";
|
||||
|
||||
%typemap(in) long long
|
||||
|
|
@ -82,25 +82,25 @@
|
|||
/* Const primitive references. Passed by value */
|
||||
|
||||
%typemap(in) const int & (int temp),
|
||||
const short & (short temp),
|
||||
const short & (short temp),
|
||||
const long & (long temp),
|
||||
const unsigned int & (unsigned int temp),
|
||||
const unsigned short & (unsigned short temp),
|
||||
const unsigned long & (unsigned long temp),
|
||||
const signed char & (signed char temp),
|
||||
const unsigned char & (unsigned char temp)
|
||||
"temp = ($*1_ltype) PyInt_AsLong($input);
|
||||
"temp = ($*1_ltype) PyInt_AsLong($input);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
$1 = &temp;";
|
||||
|
||||
%typemap(in) const bool & (bool temp)
|
||||
"temp = PyInt_AsLong($input) ? true : false;
|
||||
"temp = PyInt_AsLong($input) ? true : false;
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
$1 = &temp;";
|
||||
|
||||
%typemap(in) const float & (float temp),
|
||||
const double & (double temp)
|
||||
"temp = ($*1_ltype) PyFloat_AsDouble($input);
|
||||
const double & (double temp)
|
||||
"temp = ($*1_ltype) PyFloat_AsDouble($input);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
$1 = &temp;";
|
||||
|
||||
|
|
@ -423,41 +423,41 @@
|
|||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/* --- Inverse arguments --- */
|
||||
/* directorin typemaps */
|
||||
|
||||
/* Primitive datatypes. These only supply a parse code to PyObject_CallMethod */
|
||||
|
||||
%typemap(inv,parse="i") int "";
|
||||
%typemap(inv,parse="h") short "";
|
||||
%typemap(inv,parse="l") long "";
|
||||
%typemap(inv,parse="b") signed char "";
|
||||
%typemap(inv,parse="f") float "";
|
||||
%typemap(inv,parse="d") double "";
|
||||
%typemap(inv,parse="s") char* "";
|
||||
%typemap(inv,parse="i") bool "";
|
||||
%typemap(inv,parse="i") enum SWIGTYPE "";
|
||||
%typemap(directorin,parse="i") int "";
|
||||
%typemap(directorin,parse="h") short "";
|
||||
%typemap(directorin,parse="l") long "";
|
||||
%typemap(directorin,parse="b") signed char "";
|
||||
%typemap(directorin,parse="f") float "";
|
||||
%typemap(directorin,parse="d") double "";
|
||||
%typemap(directorin,parse="s") char* "";
|
||||
%typemap(directorin,parse="i") bool "";
|
||||
%typemap(directorin,parse="i") enum SWIGTYPE "";
|
||||
|
||||
%typemap(inv,parse="l") unsigned int, unsigned short, unsigned long, unsigned char "(long) $1_name";
|
||||
|
||||
%typemap(inv) long long
|
||||
"$input = PyLong_FromLongLong($1_name);";
|
||||
%typemap(inv) unsigned long long
|
||||
"$input = PyLong_FromUnsignedLongLong($1_name);";
|
||||
%typemap(directorin,parse="l") unsigned int, unsigned short, unsigned long, unsigned char "(long) $1_name";
|
||||
|
||||
%typemap(directorin) long long
|
||||
"$input = PyLong_FromLongLong($1_name);";
|
||||
%typemap(directorin) unsigned long long
|
||||
"$input = PyLong_FromUnsignedLongLong($1_name);";
|
||||
|
||||
%typemap(inv, parse="l") int *INV, long* INV,
|
||||
unsigned int *INV, unsigned long *INV,
|
||||
short *INV, unsigned short *INV,
|
||||
char *INV, unsigned char *INV
|
||||
"(long) *$1_name";
|
||||
%typemap(inv, parse="f") float *INV "*$1_name";
|
||||
%typemap(inv, parse="d") double *INV "*$1_name";
|
||||
%typemap(directorin, parse="l") int *DIRECTORIN, long* DIRECTORIN,
|
||||
unsigned int *DIRECTORIN, unsigned long *DIRECTORIN,
|
||||
short *DIRECTORIN, unsigned short *DIRECTORIN,
|
||||
char *DIRECTORIN, unsigned char *DIRECTORIN
|
||||
"(long) *$1_name";
|
||||
%typemap(directorin, parse="f") float *DIRECTORIN "*$1_name";
|
||||
%typemap(directorin, parse="d") double *DIRECTORIN "*$1_name";
|
||||
|
||||
%typemap(inv, parse="O") PyObject* "";
|
||||
%typemap(directorin, parse="O") PyObject* "";
|
||||
|
||||
%typemap(inv, parse="l") std::size_t "(long) $input";
|
||||
%typemap(directorin, parse="l") std::size_t "(long) $input";
|
||||
|
||||
/* // this is rather dangerous
|
||||
%typemap(inv) SWIGTYPE {
|
||||
%typemap(directorin) SWIGTYPE {
|
||||
{
|
||||
$input = SWIG_NewPointerObj((void *) &$1_name, $&1_descriptor, $owner);
|
||||
}
|
||||
|
|
@ -465,68 +465,68 @@
|
|||
*/
|
||||
|
||||
/* no can do... see python.cxx
|
||||
%typemap(inv) DIRECTORTYPE * {
|
||||
{
|
||||
__DIRECTOR__$1_ltype proxy = dynamic_cast<__DIRECTOR__$1_ltype>($1_name);
|
||||
if (!proxy) {
|
||||
$input = SWIG_NewPointerObj((void *) $1_name, $1_descriptor, 0);
|
||||
} else {
|
||||
$input = proxy->__get_self();
|
||||
}
|
||||
}
|
||||
%typemap(directorin) DIRECTORTYPE * {
|
||||
{
|
||||
__DIRECTOR__$1_ltype proxy = dynamic_cast<__DIRECTOR__$1_ltype>($1_name);
|
||||
if (!proxy) {
|
||||
$input = SWIG_NewPointerObj((void *) $1_name, $1_descriptor, 0);
|
||||
} else {
|
||||
$input = proxy->__get_self();
|
||||
}
|
||||
}
|
||||
}
|
||||
%typemap(inv) SWIGTYPE * {
|
||||
$input = SWIG_NewPointerObj((void *) $1_name, $1_descriptor, 0);
|
||||
%typemap(directorin) SWIGTYPE * {
|
||||
$input = SWIG_NewPointerObj((void *) $1_name, $1_descriptor, 0);
|
||||
}
|
||||
*/
|
||||
|
||||
/* // not currently needed, see python.cxx
|
||||
%typemap(inv) SWIGTYPE *, SWIGTYPE &, SWIGTYPE [] {
|
||||
$input = SWIG_NewPointerObj((void *) $1_name, $1_descriptor, $owner);
|
||||
%typemap(directorin) SWIGTYPE *, SWIGTYPE &, SWIGTYPE [] {
|
||||
$input = SWIG_NewPointerObj((void *) $1_name, $1_descriptor, $owner);
|
||||
}
|
||||
%typemap(inv, parse="s") void "0";
|
||||
%typemap(directorin, parse="s") void "0";
|
||||
*/
|
||||
|
||||
|
||||
/* --- Outverse arguments --- */
|
||||
/* --- directorout typemaps --- */
|
||||
|
||||
%define OUTV_TYPEMAP(type, converter)
|
||||
%typemap(argoutv) type *OUTV
|
||||
%define DIRECTOROUT_TYPEMAP(type, converter)
|
||||
%typemap(directorargout) type *DIRECTOROUT
|
||||
"*$result = (type) converter($input);
|
||||
if (PyErr_Occurred()) throw SWIG_DIRECTOR_TYPE_MISMATCH(\"Error converting Python object using converter\");";
|
||||
%typemap(outv) type
|
||||
%typemap(directorout) type
|
||||
"$result = (type) converter($input);
|
||||
if (PyErr_Occurred()) throw SWIG_DIRECTOR_TYPE_MISMATCH(\"Error converting Python object using converter\");";
|
||||
%typemap(outv) type &OUTV = type
|
||||
%typemap(directorout) type &DIRECTOROUT = type
|
||||
%enddef
|
||||
|
||||
OUTV_TYPEMAP(char, PyInt_AsLong);
|
||||
OUTV_TYPEMAP(unsigned char, PyInt_AsLong);
|
||||
OUTV_TYPEMAP(short, PyInt_AsLong);
|
||||
OUTV_TYPEMAP(unsigned short, PyInt_AsLong);
|
||||
OUTV_TYPEMAP(int, PyInt_AsLong);
|
||||
OUTV_TYPEMAP(unsigned int, PyInt_AsLong);
|
||||
OUTV_TYPEMAP(long, PyInt_AsLong);
|
||||
OUTV_TYPEMAP(unsigned long, PyInt_AsLong);
|
||||
OUTV_TYPEMAP(long long, PyLong_AsLongLong);
|
||||
OUTV_TYPEMAP(unsigned long long, PyLong_AsUnsignedLongLong);
|
||||
OUTV_TYPEMAP(float, PyFloat_AsDouble);
|
||||
OUTV_TYPEMAP(double, PyFloat_AsDouble);
|
||||
OUTV_TYPEMAP(bool, PyInt_AsLong);
|
||||
OUTV_TYPEMAP(PyObject *, );
|
||||
OUTV_TYPEMAP(char *, PyString_AsString);
|
||||
OUTV_TYPEMAP(std::size_t, PyInt_AsLong);
|
||||
DIRECTOROUT_TYPEMAP(char, PyInt_AsLong);
|
||||
DIRECTOROUT_TYPEMAP(unsigned char, PyInt_AsLong);
|
||||
DIRECTOROUT_TYPEMAP(short, PyInt_AsLong);
|
||||
DIRECTOROUT_TYPEMAP(unsigned short, PyInt_AsLong);
|
||||
DIRECTOROUT_TYPEMAP(int, PyInt_AsLong);
|
||||
DIRECTOROUT_TYPEMAP(unsigned int, PyInt_AsLong);
|
||||
DIRECTOROUT_TYPEMAP(long, PyInt_AsLong);
|
||||
DIRECTOROUT_TYPEMAP(unsigned long, PyInt_AsLong);
|
||||
DIRECTOROUT_TYPEMAP(long long, PyLong_AsLongLong);
|
||||
DIRECTOROUT_TYPEMAP(unsigned long long, PyLong_AsUnsignedLongLong);
|
||||
DIRECTOROUT_TYPEMAP(float, PyFloat_AsDouble);
|
||||
DIRECTOROUT_TYPEMAP(double, PyFloat_AsDouble);
|
||||
DIRECTOROUT_TYPEMAP(bool, PyInt_AsLong);
|
||||
DIRECTOROUT_TYPEMAP(PyObject *, );
|
||||
DIRECTOROUT_TYPEMAP(char *, PyString_AsString);
|
||||
DIRECTOROUT_TYPEMAP(std::size_t, PyInt_AsLong);
|
||||
|
||||
/* Object returned by value. Convert from a pointer */
|
||||
%typemap(outv) SWIGTYPE ($<ype argp)
|
||||
%typemap(directorout) SWIGTYPE ($<ype argp)
|
||||
"if ((SWIG_ConvertPtr($input,(void **) &argp, $&descriptor,SWIG_POINTER_EXCEPTION | $disown )) == -1) throw SWIG_DIRECTOR_TYPE_MISMATCH(\"Pointer conversion failed.\"); $result = *argp;";
|
||||
|
||||
%typemap(outv) SWIGTYPE *,
|
||||
SWIGTYPE &,
|
||||
SWIGTYPE []
|
||||
%typemap(directorout) SWIGTYPE *,
|
||||
SWIGTYPE &,
|
||||
SWIGTYPE []
|
||||
"if ((SWIG_ConvertPtr($input,(void **) &$result, $descriptor,SWIG_POINTER_EXCEPTION | $disown )) == -1) throw SWIG_DIRECTOR_TYPE_MISMATCH(\"Pointer conversion failed.\");";
|
||||
|
||||
%typemap(outv) void * "if ((SWIG_ConvertPtr($input,(void **) &$result, 0, SWIG_POINTER_EXCEPTION | $disown )) == -1) throw SWIG_DIRECTOR_TYPE_MISMATCH(\"Pointer conversion failed.\");";
|
||||
%typemap(directorout) void * "if ((SWIG_ConvertPtr($input,(void **) &$result, 0, SWIG_POINTER_EXCEPTION | $disown )) == -1) throw SWIG_DIRECTOR_TYPE_MISMATCH(\"Pointer conversion failed.\");";
|
||||
|
||||
|
||||
|
||||
|
|
@ -569,22 +569,22 @@ OUTV_TYPEMAP(std::size_t, PyInt_AsLong);
|
|||
* ------------------------------------------------------------ */
|
||||
|
||||
%typecheck(SWIG_TYPECHECK_INTEGER)
|
||||
int, short, long,
|
||||
unsigned int, unsigned short, unsigned long,
|
||||
signed char, unsigned char,
|
||||
long long, unsigned long long,
|
||||
const int &, const short &, const long &,
|
||||
const unsigned int &, const unsigned short &, const unsigned long &,
|
||||
const long long &, const unsigned long long &,
|
||||
enum SWIGTYPE,
|
||||
int, short, long,
|
||||
unsigned int, unsigned short, unsigned long,
|
||||
signed char, unsigned char,
|
||||
long long, unsigned long long,
|
||||
const int &, const short &, const long &,
|
||||
const unsigned int &, const unsigned short &, const unsigned long &,
|
||||
const long long &, const unsigned long long &,
|
||||
enum SWIGTYPE,
|
||||
bool, const bool &
|
||||
{
|
||||
$1 = (PyInt_Check($input) || PyLong_Check($input)) ? 1 : 0;
|
||||
}
|
||||
|
||||
%typecheck(SWIG_TYPECHECK_DOUBLE)
|
||||
float, double,
|
||||
const float &, const double &
|
||||
float, double,
|
||||
const float &, const double &
|
||||
{
|
||||
$1 = (PyFloat_Check($input) || PyInt_Check($input) || PyLong_Check($input)) ? 1 : 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,22 +67,22 @@ SwigComplex_AsComplexDouble(PyObject *o)
|
|||
|
||||
// C++ proxy class typemaps
|
||||
|
||||
%typemap(inv) Complex {
|
||||
%typemap(directorin) Complex {
|
||||
$input = PyComplex_FromDoubles($1_name.real(), $1_name.imag());
|
||||
}
|
||||
|
||||
%typemap(inv) const Complex & {
|
||||
%typemap(directorin) const Complex & {
|
||||
$input = PyComplex_FromDoubles($1_name.real(), $1_name.imag());
|
||||
}
|
||||
|
||||
%typemap(outv) Complex {
|
||||
%typemap(directorout) Complex {
|
||||
$result = SwigComplex_As< Complex >($input);
|
||||
if (PyErr_Occurred()) {
|
||||
throw SWIG_DIRECTOR_TYPE_MISMATCH("Expecting a complex or compatible type");
|
||||
}
|
||||
}
|
||||
|
||||
%typemap(outv) const complex<T>& (Complex temp) {
|
||||
%typemap(directorout) const complex<T>& (Complex temp) {
|
||||
temp = SwigComplex_As< Complex >($input);
|
||||
if (PyErr_Occurred()) {
|
||||
throw SWIG_DIRECTOR_TYPE_MISMATCH("Expecting a complex or compatible type");
|
||||
|
|
|
|||
|
|
@ -53,11 +53,11 @@ namespace std {
|
|||
$result = PyString_FromStringAndSize($1->data(),$1->size());
|
||||
}
|
||||
|
||||
%typemap(inv, parse="s") string, const string &, string & "$1_name.c_str()";
|
||||
%typemap(directorin, parse="s") string, const string &, string & "$1_name.c_str()";
|
||||
|
||||
%typemap(inv, parse="s") string *, const string * "$1_name->c_str()";
|
||||
%typemap(directorin, parse="s") string *, const string * "$1_name->c_str()";
|
||||
|
||||
%typemap(outv) string {
|
||||
%typemap(directorout) string {
|
||||
if (PyString_Check($input))
|
||||
$result = std::string(PyString_AsString($input),
|
||||
PyString_Size($input));
|
||||
|
|
@ -65,7 +65,7 @@ namespace std {
|
|||
throw SWIG_DIRECTOR_TYPE_MISMATCH("string expected");
|
||||
}
|
||||
|
||||
%typemap(outv) const string & (std::string temp) {
|
||||
%typemap(directorout) const string & (std::string temp) {
|
||||
if (PyString_Check($input)) {
|
||||
temp = std::string(PyString_AsString($input),
|
||||
PyString_Size($input));
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ namespace std {
|
|||
SWIG_fail;
|
||||
}
|
||||
}
|
||||
%typemap(outv) vector<T> (std::vector<T>* v) {
|
||||
%typemap(directorout) vector<T> (std::vector<T>* v) {
|
||||
if (PyTuple_Check($input) || PyList_Check($input)) {
|
||||
unsigned int size = (PyTuple_Check($input) ?
|
||||
PyTuple_Size($input) :
|
||||
|
|
@ -164,7 +164,7 @@ namespace std {
|
|||
SWIG_fail;
|
||||
}
|
||||
}
|
||||
%typemap(outv) const vector<T>& (std::vector<T> temp,
|
||||
%typemap(directorout) const vector<T>& (std::vector<T> temp,
|
||||
std::vector<T>* v),
|
||||
const vector<T>* (std::vector<T> temp,
|
||||
std::vector<T>* v) {
|
||||
|
|
@ -183,7 +183,7 @@ namespace std {
|
|||
Py_DECREF(o);
|
||||
} else {
|
||||
Py_DECREF(o);
|
||||
throw SWIG_DIRECTOR_TYPE_MISMATCH("vector<" #T "> expected");
|
||||
throw SWIG_DIRECTOR_TYPE_MISMATCH("vector<" #T "> expected");
|
||||
}
|
||||
}
|
||||
} else if (SWIG_ConvertPtr($input,(void **) &v,
|
||||
|
|
@ -202,7 +202,7 @@ namespace std {
|
|||
$descriptor(T *), 1));
|
||||
}
|
||||
}
|
||||
%typemap(inv) vector<T> {
|
||||
%typemap(directorin) vector<T> {
|
||||
$input = PyTuple_New($1_name.size());
|
||||
for (unsigned int i=0; i<$1_name.size(); i++) {
|
||||
T* ptr = new T((($1_type &)$1_name)[i]);
|
||||
|
|
@ -334,7 +334,7 @@ namespace std {
|
|||
self->insert(self->begin()+i,v.begin(),v.end());
|
||||
} else {
|
||||
self->insert(self->end(),v.begin(),v.end());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
void __delitem__(int i) {
|
||||
|
|
@ -388,7 +388,7 @@ namespace std {
|
|||
SWIG_fail;
|
||||
}
|
||||
}
|
||||
%typemap(outv) vector<T*> (std::vector<T*>* v) {
|
||||
%typemap(directorout) vector<T*> (std::vector<T*>* v) {
|
||||
if (PyTuple_Check($input) || PyList_Check($input)) {
|
||||
unsigned int size = (PyTuple_Check($input) ?
|
||||
PyTuple_Size($input) :
|
||||
|
|
@ -445,7 +445,7 @@ namespace std {
|
|||
SWIG_fail;
|
||||
}
|
||||
}
|
||||
%typemap(outv) const vector<T *>& (std::vector<T *> temp,
|
||||
%typemap(directorout) const vector<T *>& (std::vector<T *> temp,
|
||||
std::vector<T *>* v),
|
||||
const vector<T *>* (std::vector<T *> temp,
|
||||
std::vector<T *>* v) {
|
||||
|
|
@ -483,7 +483,7 @@ namespace std {
|
|||
$descriptor(T*), 0));
|
||||
}
|
||||
}
|
||||
%typemap(inv) vector<T*> {
|
||||
%typemap(directorin) vector<T*> {
|
||||
$input = PyTuple_New($1_name.size());
|
||||
for (unsigned int i=0; i<$1_name.size(); i++) {
|
||||
T *ptr = (($1_type &)$1_name)[i];
|
||||
|
|
@ -665,7 +665,7 @@ namespace std {
|
|||
SWIG_fail;
|
||||
}
|
||||
}
|
||||
%typemap(outv) vector<T> (std::vector<T>* v) {
|
||||
%typemap(directorout) vector<T> (std::vector<T>* v) {
|
||||
if (PyTuple_Check($input) || PyList_Check($input)) {
|
||||
unsigned int size = (PyTuple_Check($input) ?
|
||||
PyTuple_Size($input) :
|
||||
|
|
@ -718,7 +718,7 @@ namespace std {
|
|||
SWIG_fail;
|
||||
}
|
||||
}
|
||||
%typemap(outv) const vector<T>& (std::vector<T> temp,
|
||||
%typemap(directorout) const vector<T>& (std::vector<T> temp,
|
||||
std::vector<T>* v),
|
||||
const vector<T>* (std::vector<T> temp,
|
||||
std::vector<T>* v) {
|
||||
|
|
@ -735,7 +735,7 @@ namespace std {
|
|||
Py_DECREF(o);
|
||||
} else {
|
||||
Py_DECREF(o);
|
||||
throw SWIG_DIRECTOR_TYPE_MISMATCH("vector<" #T "> expected");
|
||||
throw SWIG_DIRECTOR_TYPE_MISMATCH("vector<" #T "> expected");
|
||||
}
|
||||
}
|
||||
} else if (SWIG_ConvertPtr($input,(void **) &v,
|
||||
|
|
@ -751,7 +751,7 @@ namespace std {
|
|||
PyTuple_SetItem($result,i,
|
||||
CONVERT_TO((($1_type &)$1)[i]));
|
||||
}
|
||||
%typemap(inv) vector<T> {
|
||||
%typemap(directorin) vector<T> {
|
||||
$input = PyTuple_New($1_name.size());
|
||||
for (unsigned int i=0; i<$1_name.size(); i++)
|
||||
PyTuple_SetItem($input,i,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue