Fixes for std::pair typemaps

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9230 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Luigi Ballabio 2006-08-01 07:51:45 +00:00
commit ca4316a38c
3 changed files with 39 additions and 39 deletions

View file

@ -34,7 +34,7 @@ namespace std {
second = gh_cdr($input); second = gh_cdr($input);
x = (T*) SWIG_MustGetPtr(first,$descriptor(T *),$argnum, 0); x = (T*) SWIG_MustGetPtr(first,$descriptor(T *),$argnum, 0);
y = (U*) SWIG_MustGetPtr(second,$descriptor(U *),$argnum, 0); y = (U*) SWIG_MustGetPtr(second,$descriptor(U *),$argnum, 0);
$1 = std::make_pair(x,y); $1 = std::make_pair(*x,*y);
} else { } else {
$1 = *(($&1_type) $1 = *(($&1_type)
SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0)); SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0));
@ -52,7 +52,7 @@ namespace std {
second = gh_cdr($input); second = gh_cdr($input);
x = (T*) SWIG_MustGetPtr(first,$descriptor(T *),$argnum, 0); x = (T*) SWIG_MustGetPtr(first,$descriptor(T *),$argnum, 0);
y = (U*) SWIG_MustGetPtr(second,$descriptor(U *),$argnum, 0); y = (U*) SWIG_MustGetPtr(second,$descriptor(U *),$argnum, 0);
temp = std::make_pair(x,y); temp = std::make_pair(*x,*y);
$1 = &temp; $1 = &temp;
} else { } else {
$1 = ($1_ltype) $1 = ($1_ltype)
@ -142,7 +142,7 @@ namespace std {
SWIG_exception(SWIG_TypeError, SWIG_exception(SWIG_TypeError,
"map<" #T "," #U "> expected"); "map<" #T "," #U "> expected");
y = (U*) SWIG_MustGetPtr(second,$descriptor(U *),$argnum, 0); y = (U*) SWIG_MustGetPtr(second,$descriptor(U *),$argnum, 0);
$1 = std::make_pair(CONVERT_FROM(first),y); $1 = std::make_pair(CONVERT_FROM(first),*y);
} else { } else {
$1 = *(($&1_type) $1 = *(($&1_type)
SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0)); SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0));
@ -161,7 +161,7 @@ namespace std {
SWIG_exception(SWIG_TypeError, SWIG_exception(SWIG_TypeError,
"map<" #T "," #U "> expected"); "map<" #T "," #U "> expected");
y = (U*) SWIG_MustGetPtr(second,$descriptor(U *),$argnum, 0); y = (U*) SWIG_MustGetPtr(second,$descriptor(U *),$argnum, 0);
temp = std::make_pair(CONVERT_FROM(first),y); temp = std::make_pair(CONVERT_FROM(first),*y);
$1 = &temp; $1 = &temp;
} else { } else {
$1 = ($1_ltype) $1 = ($1_ltype)
@ -243,7 +243,7 @@ namespace std {
if (!CHECK(second)) if (!CHECK(second))
SWIG_exception(SWIG_TypeError, SWIG_exception(SWIG_TypeError,
"map<" #T "," #U "> expected"); "map<" #T "," #U "> expected");
$1 = std::make_pair(x,CONVERT_FROM(second)); $1 = std::make_pair(*x,CONVERT_FROM(second));
} else { } else {
$1 = *(($&1_type) $1 = *(($&1_type)
SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0)); SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0));
@ -262,7 +262,7 @@ namespace std {
if (!CHECK(second)) if (!CHECK(second))
SWIG_exception(SWIG_TypeError, SWIG_exception(SWIG_TypeError,
"map<" #T "," #U "> expected"); "map<" #T "," #U "> expected");
temp = std::make_pair(x,CONVERT_FROM(second)); temp = std::make_pair(*x,CONVERT_FROM(second));
$1 = &temp; $1 = &temp;
} else { } else {
$1 = ($1_ltype) $1 = ($1_ltype)

View file

@ -35,7 +35,7 @@ namespace std {
second = scheme_cdr($input); second = scheme_cdr($input);
x = (T*) SWIG_MustGetPtr(first,$descriptor(T *),$argnum, 0); x = (T*) SWIG_MustGetPtr(first,$descriptor(T *),$argnum, 0);
y = (U*) SWIG_MustGetPtr(second,$descriptor(U *),$argnum, 0); y = (U*) SWIG_MustGetPtr(second,$descriptor(U *),$argnum, 0);
$1 = make_pair(x,y); $1 = std::make_pair(*x,*y);
} else { } else {
$1 = *(($&1_type) $1 = *(($&1_type)
SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0)); SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0));
@ -53,7 +53,7 @@ namespace std {
second = scheme_cdr($input); second = scheme_cdr($input);
x = (T*) SWIG_MustGetPtr(first,$descriptor(T *),$argnum, 0); x = (T*) SWIG_MustGetPtr(first,$descriptor(T *),$argnum, 0);
y = (U*) SWIG_MustGetPtr(second,$descriptor(U *),$argnum, 0); y = (U*) SWIG_MustGetPtr(second,$descriptor(U *),$argnum, 0);
temp = make_pair(x,y); temp = std::make_pair(*x,*y);
$1 = &temp; $1 = &temp;
} else { } else {
$1 = ($1_ltype) $1 = ($1_ltype)
@ -142,7 +142,7 @@ namespace std {
SWIG_exception(SWIG_TypeError, SWIG_exception(SWIG_TypeError,
"pair<" #T "," #U "> expected"); "pair<" #T "," #U "> expected");
y = (U*) SWIG_MustGetPtr(second,$descriptor(U *),$argnum, 0); y = (U*) SWIG_MustGetPtr(second,$descriptor(U *),$argnum, 0);
$1 = make_pair(CONVERT_FROM(first),y); $1 = std::make_pair(CONVERT_FROM(first),*y);
} else { } else {
$1 = *(($&1_type) $1 = *(($&1_type)
SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0)); SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0));
@ -161,7 +161,7 @@ namespace std {
SWIG_exception(SWIG_TypeError, SWIG_exception(SWIG_TypeError,
"pair<" #T "," #U "> expected"); "pair<" #T "," #U "> expected");
y = (U*) SWIG_MustGetPtr(second,$descriptor(U *),$argnum, 0); y = (U*) SWIG_MustGetPtr(second,$descriptor(U *),$argnum, 0);
temp = make_pair(CONVERT_FROM(first),y); temp = std::make_pair(CONVERT_FROM(first),*y);
$1 = &temp; $1 = &temp;
} else { } else {
$1 = ($1_ltype) $1 = ($1_ltype)
@ -243,7 +243,7 @@ namespace std {
if (!CHECK(second)) if (!CHECK(second))
SWIG_exception(SWIG_TypeError, SWIG_exception(SWIG_TypeError,
"pair<" #T "," #U "> expected"); "pair<" #T "," #U "> expected");
$1 = make_pair(x,CONVERT_FROM(second)); $1 = std::make_pair(*x,CONVERT_FROM(second));
} else { } else {
$1 = *(($&1_type) $1 = *(($&1_type)
SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0)); SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0));
@ -262,7 +262,7 @@ namespace std {
if (!CHECK(second)) if (!CHECK(second))
SWIG_exception(SWIG_TypeError, SWIG_exception(SWIG_TypeError,
"pair<" #T "," #U "> expected"); "pair<" #T "," #U "> expected");
temp = make_pair(x,CONVERT_FROM(second)); temp = std::make_pair(*x,CONVERT_FROM(second));
$1 = &temp; $1 = &temp;
} else { } else {
$1 = ($1_ltype) $1 = ($1_ltype)
@ -356,7 +356,7 @@ namespace std {
std::pair<T,U>* m) { std::pair<T,U>* m) {
if (SCHEME_PAIRP($input)) { if (SCHEME_PAIRP($input)) {
Scheme_Object *first, *second; Scheme_Object *first, *second;
T *x; T *x;
first = scheme_car($input); first = scheme_car($input);
second = scheme_cdr($input); second = scheme_cdr($input);
x = (T*) SWIG_MustGetPtr(first,$descriptor(T *),$argnum, 0); x = (T*) SWIG_MustGetPtr(first,$descriptor(T *),$argnum, 0);

View file

@ -37,7 +37,7 @@ namespace std {
VALUE second = RARRAY($input)->ptr[1]; VALUE second = RARRAY($input)->ptr[1];
SWIG_ConvertPtr(first, (void **) &x, $descriptor(T *), 1); SWIG_ConvertPtr(first, (void **) &x, $descriptor(T *), 1);
SWIG_ConvertPtr(second, (void **) &y, $descriptor(U *), 1); SWIG_ConvertPtr(second, (void **) &y, $descriptor(U *), 1);
$1 = std::make_pair(x,y); $1 = std::make_pair(*x,*y);
} else { } else {
SWIG_ConvertPtr($input, (void **) &p, $&1_descriptor, 1); SWIG_ConvertPtr($input, (void **) &p, $&1_descriptor, 1);
$1 = *p; $1 = *p;
@ -58,7 +58,7 @@ namespace std {
VALUE second = RARRAY($input)->ptr[1]; VALUE second = RARRAY($input)->ptr[1];
SWIG_ConvertPtr(first, (void **) &x, $descriptor(T *), 1); SWIG_ConvertPtr(first, (void **) &x, $descriptor(T *), 1);
SWIG_ConvertPtr(second, (void **) &y, $descriptor(U *), 1); SWIG_ConvertPtr(second, (void **) &y, $descriptor(U *), 1);
temp = std::make_pair(x,y); temp = std::make_pair(*x,*y);
$1 = &temp; $1 = &temp;
} else { } else {
SWIG_ConvertPtr($input, (void **) &p, $1_descriptor, 1); SWIG_ConvertPtr($input, (void **) &p, $1_descriptor, 1);
@ -165,7 +165,7 @@ namespace std {
SWIG_exception(SWIG_TypeError, SWIG_exception(SWIG_TypeError,
"pair<" #T "," #U "> expected"); "pair<" #T "," #U "> expected");
SWIG_ConvertPtr(second, (void **) &y, $descriptor(U *), 1); SWIG_ConvertPtr(second, (void **) &y, $descriptor(U *), 1);
$1 = std::make_pair(CONVERT_FROM(first),y); $1 = std::make_pair(CONVERT_FROM(first),*y);
} else { } else {
SWIG_ConvertPtr($input, (void **) &p, $&1_descriptor, 1); SWIG_ConvertPtr($input, (void **) &p, $&1_descriptor, 1);
$1 = *p; $1 = *p;
@ -187,7 +187,7 @@ namespace std {
SWIG_exception(SWIG_TypeError, SWIG_exception(SWIG_TypeError,
"pair<" #T "," #U "> expected"); "pair<" #T "," #U "> expected");
SWIG_ConvertPtr(second, (void **) &y, $descriptor(U *), 1); SWIG_ConvertPtr(second, (void **) &y, $descriptor(U *), 1);
temp = std::make_pair(CONVERT_FROM(first),y); temp = std::make_pair(CONVERT_FROM(first),*y);
$1 = &temp; $1 = &temp;
} else { } else {
SWIG_ConvertPtr($input, (void **) &p, $1_descriptor, 1); SWIG_ConvertPtr($input, (void **) &p, $1_descriptor, 1);
@ -287,7 +287,7 @@ namespace std {
if (!CHECK(second)) if (!CHECK(second))
SWIG_exception(SWIG_TypeError, SWIG_exception(SWIG_TypeError,
"pair<" #T "," #U "> expected"); "pair<" #T "," #U "> expected");
$1 = std::make_pair(x,CONVERT_FROM(second)); $1 = std::make_pair(*x,CONVERT_FROM(second));
} else { } else {
SWIG_ConvertPtr($input, (void **) &p, $&1_descriptor, 1); SWIG_ConvertPtr($input, (void **) &p, $&1_descriptor, 1);
$1 = *p; $1 = *p;
@ -310,7 +310,7 @@ namespace std {
if (!CHECK(second)) if (!CHECK(second))
SWIG_exception(SWIG_TypeError, SWIG_exception(SWIG_TypeError,
"pair<" #T "," #U "> expected"); "pair<" #T "," #U "> expected");
temp = std::make_pair(x,CONVERT_FROM(second)); temp = std::make_pair(*x,CONVERT_FROM(second));
$1 = &temp; $1 = &temp;
} else { } else {
SWIG_ConvertPtr($input, (void **) &p, $1_descriptor, 1); SWIG_ConvertPtr($input, (void **) &p, $1_descriptor, 1);