PageRenderTime 45ms CodeModel.GetById 15ms app.highlight 17ms RepoModel.GetById 1ms app.codeStats 1ms

/trunk/Lib/mzscheme/std_pair.i

#
Swig | 870 lines | 826 code | 23 blank | 21 comment | 0 complexity | 836235f4704120082071d11022119ad1 MD5 | raw file
  1/* -----------------------------------------------------------------------------
  2 * std_pair.i
  3 *
  4 * SWIG typemaps for std::pair
  5 * ----------------------------------------------------------------------------- */
  6
  7%include <std_common.i>
  8%include <exception.i>
  9
 10
 11// ------------------------------------------------------------------------
 12// std::pair
 13//
 14// See std_vector.i for the rationale of typemap application
 15// ------------------------------------------------------------------------
 16
 17%{
 18#include <utility>
 19%}
 20
 21// exported class
 22
 23namespace std {
 24
 25    template<class T, class U> struct pair {
 26        %typemap(in) pair<T,U> (std::pair<T,U>* m) {
 27            if (SCHEME_PAIRP($input)) {
 28                T* x;
 29                U* y;
 30                Scheme_Object *first, *second;
 31                first = scheme_car($input);
 32                second = scheme_cdr($input);
 33                x = (T*) SWIG_MustGetPtr(first,$descriptor(T *),$argnum, 0);
 34                y = (U*) SWIG_MustGetPtr(second,$descriptor(U *),$argnum, 0);
 35                $1 = std::make_pair(*x,*y);
 36            } else {
 37                $1 = *(($&1_type)
 38                       SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0));
 39            }
 40        }
 41        %typemap(in) const pair<T,U>& (std::pair<T,U> temp,
 42                                       std::pair<T,U>* m),
 43                     const pair<T,U>* (std::pair<T,U> temp,
 44                                       std::pair<T,U>* m) {
 45            if (SCHEME_PAIRP($input)) {
 46                T* x;
 47                U* y;
 48                Scheme_Object *first, *second;
 49                first = scheme_car($input);
 50                second = scheme_cdr($input);
 51                x = (T*) SWIG_MustGetPtr(first,$descriptor(T *),$argnum, 0);
 52                y = (U*) SWIG_MustGetPtr(second,$descriptor(U *),$argnum, 0);
 53                temp = std::make_pair(*x,*y);
 54                $1 = &temp;
 55            } else {
 56                $1 = ($1_ltype)
 57                    SWIG_MustGetPtr($input,$1_descriptor,$argnum, 0);
 58            }
 59        }
 60        %typemap(out) pair<T,U> {
 61            T* x = new T($1.first);
 62            U* y = new U($1.second);
 63            Scheme_Object* first = SWIG_NewPointerObj(x,$descriptor(T *), 1);
 64            Scheme_Object* second = SWIG_NewPointerObj(y,$descriptor(U *), 1);
 65            $result = scheme_make_pair(first,second);
 66        }
 67        %typecheck(SWIG_TYPECHECK_PAIR) pair<T,U> {
 68            /* native pair? */
 69            if (SCHEME_PAIRP($input)) {
 70                T* x;
 71                U* y;
 72                Scheme_Object* first = scheme_car($input);
 73                Scheme_Object* second = scheme_cdr($input);
 74                if (SWIG_ConvertPtr(first,(void**) &x,
 75                                    $descriptor(T *), 0) != -1 &&
 76                    SWIG_ConvertPtr(second,(void**) &y,
 77                                    $descriptor(U *), 0) != -1) {
 78                        $1 = 1;
 79                } else {
 80                    $1 = 0;
 81                }
 82            } else {
 83                /* wrapped pair? */
 84                std::pair<T,U >* p;
 85                if (SWIG_ConvertPtr($input,(void **) &p,
 86                                    $&1_descriptor, 0) != -1)
 87                    $1 = 1;
 88                else
 89                    $1 = 0;
 90            }
 91        }
 92        %typecheck(SWIG_TYPECHECK_PAIR) const pair<T,U>&,
 93                                        const pair<T,U>* {
 94            /* native pair? */
 95            if (SCHEME_PAIRP($input)) {
 96                T* x;
 97                U* y;
 98                Scheme_Object* first = scheme_car($input);
 99                Scheme_Object* second = scheme_cdr($input);
100                if (SWIG_ConvertPtr(first,(void**) &x,
101                                    $descriptor(T *), 0) != -1 &&
102                    SWIG_ConvertPtr(second,(void**) &y,
103                                    $descriptor(U *), 0) != -1) {
104                        $1 = 1;
105                } else {
106                    $1 = 0;
107                }
108            } else {
109                /* wrapped pair? */
110                std::pair<T,U >* p;
111                if (SWIG_ConvertPtr($input,(void **) &p,
112                                    $1_descriptor, 0) != -1)
113                    $1 = 1;
114                else
115                    $1 = 0;
116            }
117        }
118        pair();
119        pair(T first, U second);
120        pair(const pair& p);
121
122        template <class U1, class U2> pair(const pair<U1, U2> &p);
123
124        T first;
125        U second;
126    };
127
128    // specializations for built-ins
129
130    %define specialize_std_pair_on_first(T,CHECK,CONVERT_FROM,CONVERT_TO)
131    template<class U> struct pair<T,U> {
132        %typemap(in) pair<T,U> (std::pair<T,U>* m) {
133            if (SCHEME_PAIRP($input)) {
134                U* y;
135                Scheme_Object *first, *second;
136                first = scheme_car($input);
137                second = scheme_cdr($input);
138                if (!CHECK(first))
139                    SWIG_exception(SWIG_TypeError,
140                                   "pair<" #T "," #U "> expected");
141                y = (U*) SWIG_MustGetPtr(second,$descriptor(U *),$argnum, 0);
142                $1 = std::make_pair(CONVERT_FROM(first),*y);
143            } else {
144                $1 = *(($&1_type)
145                       SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0));
146            }
147        }
148        %typemap(in) const pair<T,U>& (std::pair<T,U> temp,
149                                       std::pair<T,U>* m),
150                     const pair<T,U>* (std::pair<T,U> temp,
151                                       std::pair<T,U>* m) {
152            if (SCHEME_PAIRP($input)) {
153                U* y;
154                Scheme_Object *first, *second;
155                first = scheme_car($input);
156                second = scheme_cdr($input);
157                if (!CHECK(first))
158                    SWIG_exception(SWIG_TypeError,
159                                   "pair<" #T "," #U "> expected");
160                y = (U*) SWIG_MustGetPtr(second,$descriptor(U *),$argnum, 0);
161                temp = std::make_pair(CONVERT_FROM(first),*y);
162                $1 = &temp;
163            } else {
164                $1 = ($1_ltype)
165                    SWIG_MustGetPtr($input,$1_descriptor,$argnum, 0);
166            }
167        }
168        %typemap(out) pair<T,U> {
169            U* y = new U($1.second);
170            Scheme_Object* second = SWIG_NewPointerObj(y,$descriptor(U *), 1);
171            $result = scheme_make_pair(CONVERT_TO($1.first),second);
172        }
173        %typecheck(SWIG_TYPECHECK_PAIR) pair<T,U> {
174            /* native pair? */
175            if (SCHEME_PAIRP($input)) {
176                U* y;
177                Scheme_Object* first = scheme_car($input);
178                Scheme_Object* second = scheme_cdr($input);
179                if (CHECK(first) &&
180                    SWIG_ConvertPtr(second,(void**) &y,
181                                    $descriptor(U *), 0) != -1) {
182                        $1 = 1;
183                } else {
184                    $1 = 0;
185                }
186            } else {
187                /* wrapped pair? */
188                std::pair<T,U >* p;
189                if (SWIG_ConvertPtr($input,(void **) &p,
190                                    $&1_descriptor, 0) != -1)
191                    $1 = 1;
192                else
193                    $1 = 0;
194            }
195        }
196        %typecheck(SWIG_TYPECHECK_PAIR) const pair<T,U>&,
197                                        const pair<T,U>* {
198            /* native pair? */
199            if (SCHEME_PAIRP($input)) {
200                U* y;
201                Scheme_Object* first = scheme_car($input);
202                Scheme_Object* second = scheme_cdr($input);
203                if (CHECK(first) &&
204                    SWIG_ConvertPtr(second,(void**) &y,
205                                    $descriptor(U *), 0) != -1) {
206                        $1 = 1;
207                } else {
208                    $1 = 0;
209                }
210            } else {
211                /* wrapped pair? */
212                std::pair<T,U >* p;
213                if (SWIG_ConvertPtr($input,(void **) &p,
214                                    $1_descriptor, 0) != -1)
215                    $1 = 1;
216                else
217                    $1 = 0;
218            }
219        }
220        pair();
221        pair(T first, U second);
222        pair(const pair& p);
223
224        template <class U1, class U2> pair(const pair<U1, U2> &p);
225
226        T first;
227        U second;
228    };
229    %enddef
230
231    %define specialize_std_pair_on_second(U,CHECK,CONVERT_FROM,CONVERT_TO)
232    template<class T> struct pair<T,U> {
233        %typemap(in) pair<T,U> (std::pair<T,U>* m) {
234            if (SCHEME_PAIRP($input)) {
235                T* x;
236                Scheme_Object *first, *second;
237                first = scheme_car($input);
238                second = scheme_cdr($input);
239                x = (T*) SWIG_MustGetPtr(first,$descriptor(T *),$argnum, 0);
240                if (!CHECK(second))
241                    SWIG_exception(SWIG_TypeError,
242                                   "pair<" #T "," #U "> expected");
243                $1 = std::make_pair(*x,CONVERT_FROM(second));
244            } else {
245                $1 = *(($&1_type)
246                       SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0));
247            }
248        }
249        %typemap(in) const pair<T,U>& (std::pair<T,U> temp,
250                                       std::pair<T,U>* m),
251                     const pair<T,U>* (std::pair<T,U> temp,
252                                       std::pair<T,U>* m) {
253            if (SCHEME_PAIRP($input)) {
254                T* x;
255                Scheme_Object *first, *second;
256                first = scheme_car($input);
257                second = scheme_cdr($input);
258                x = (T*) SWIG_MustGetPtr(first,$descriptor(T *),$argnum, 0);
259                if (!CHECK(second))
260                    SWIG_exception(SWIG_TypeError,
261                                   "pair<" #T "," #U "> expected");
262                temp = std::make_pair(*x,CONVERT_FROM(second));
263                $1 = &temp;
264            } else {
265                $1 = ($1_ltype)
266                    SWIG_MustGetPtr($input,$1_descriptor,$argnum, 0);
267            }
268        }
269        %typemap(out) pair<T,U> {
270            T* x = new T($1.first);
271            Scheme_Object* first = SWIG_NewPointerObj(x,$descriptor(T *), 1);
272            $result = scheme_make_pair(first,CONVERT_TO($1.second));
273        }
274        %typecheck(SWIG_TYPECHECK_PAIR) pair<T,U> {
275            /* native pair? */
276            if (SCHEME_PAIRP($input)) {
277                T* x;
278                Scheme_Object* first = scheme_car($input);
279                Scheme_Object* second = scheme_cdr($input);
280                if (SWIG_ConvertPtr(first,(void**) &x,
281                                    $descriptor(T *), 0) != -1 &&
282                    CHECK(second)) {
283                        $1 = 1;
284                } else {
285                    $1 = 0;
286                }
287            } else {
288                /* wrapped pair? */
289                std::pair<T,U >* p;
290                if (SWIG_ConvertPtr($input,(void **) &p,
291                                    $&1_descriptor, 0) != -1)
292                    $1 = 1;
293                else
294                    $1 = 0;
295            }
296        }
297        %typecheck(SWIG_TYPECHECK_PAIR) const pair<T,U>&,
298                                        const pair<T,U>* {
299            /* native pair? */
300            if (SCHEME_PAIRP($input)) {
301                T* x;
302                Scheme_Object* first = scheme_car($input);
303                Scheme_Object* second = scheme_cdr($input);
304                if (SWIG_ConvertPtr(first,(void**) &x,
305                                    $descriptor(T *), 0) != -1 &&
306                    CHECK(second)) {
307                        $1 = 1;
308                } else {
309                    $1 = 0;
310                }
311            } else {
312                /* wrapped pair? */
313                std::pair<T,U >* p;
314                if (SWIG_ConvertPtr($input,(void **) &p,
315                                    $1_descriptor, 0) != -1)
316                    $1 = 1;
317                else
318                    $1 = 0;
319            }
320        }
321        pair();
322        pair(T first, U second);
323        pair(const pair& p);
324
325        template <class U1, class U2> pair(const pair<U1, U2> &p);
326
327        T first;
328        U second;
329    };
330    %enddef
331
332    %define specialize_std_pair_on_both(T,CHECK_T,CONVERT_T_FROM,CONVERT_T_TO,
333                                        U,CHECK_U,CONVERT_U_FROM,CONVERT_U_TO)
334    template<> struct pair<T,U> {
335        %typemap(in) pair<T,U> (std::pair<T,U>* m) {
336            if (SCHEME_PAIRP($input)) {
337                Scheme_Object *first, *second;
338                first = scheme_car($input);
339                second = scheme_cdr($input);
340                if (!CHECK_T(first) || !CHECK_U(second))
341                    SWIG_exception(SWIG_TypeError,
342                                   "pair<" #T "," #U "> expected");
343                $1 = make_pair(CONVERT_T_FROM(first),
344                               CONVERT_U_FROM(second));
345            } else {
346                $1 = *(($&1_type)
347                       SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0));
348            }
349        }
350        %typemap(in) const pair<T,U>& (std::pair<T,U> temp,
351                                       std::pair<T,U>* m),
352                     const pair<T,U>* (std::pair<T,U> temp,
353                                       std::pair<T,U>* m) {
354            if (SCHEME_PAIRP($input)) {
355                Scheme_Object *first, *second;
356            T *x;
357                first = scheme_car($input);
358                second = scheme_cdr($input);
359                x = (T*) SWIG_MustGetPtr(first,$descriptor(T *),$argnum, 0);
360                if (!CHECK_T(first) || !CHECK_U(second))
361                    SWIG_exception(SWIG_TypeError,
362                                   "pair<" #T "," #U "> expected");
363                temp = make_pair(CONVERT_T_FROM(first),
364                               CONVERT_U_FROM(second));
365                $1 = &temp;
366            } else {
367                $1 = ($1_ltype)
368                    SWIG_MustGetPtr($input,$1_descriptor,$argnum, 0);
369            }
370        }
371        %typemap(out) pair<T,U> {
372            $result = scheme_make_pair(CONVERT_T_TO($1.first),
373                                       CONVERT_U_TO($1.second));
374        }
375        %typecheck(SWIG_TYPECHECK_PAIR) pair<T,U> {
376            /* native pair? */
377            if (SCHEME_PAIRP($input)) {
378                Scheme_Object* first = scheme_car($input);
379                Scheme_Object* second = scheme_cdr($input);
380                if (CHECK_T(first) && CHECK_U(second)) {
381                        $1 = 1;
382                } else {
383                    $1 = 0;
384                }
385            } else {
386                /* wrapped pair? */
387                std::pair<T,U >* p;
388                if (SWIG_ConvertPtr($input,(void **) &p,
389                                    $&1_descriptor, 0) != -1)
390                    $1 = 1;
391                else
392                    $1 = 0;
393            }
394        }
395        %typecheck(SWIG_TYPECHECK_PAIR) const pair<T,U>&,
396                                        const pair<T,U>* {
397            /* native pair? */
398            if (SCHEME_PAIRP($input)) {
399                Scheme_Object* first = scheme_car($input);
400                Scheme_Object* second = scheme_cdr($input);
401                if (CHECK_T(first) && CHECK_U(second)) {
402                        $1 = 1;
403                } else {
404                    $1 = 0;
405                }
406            } else {
407                /* wrapped pair? */
408                std::pair<T,U >* p;
409                if (SWIG_ConvertPtr($input,(void **) &p,
410                                    $1_descriptor, 0) != -1)
411                    $1 = 1;
412                else
413                    $1 = 0;
414            }
415        }
416        pair();
417        pair(T first, U second);
418        pair(const pair& p);
419
420        template <class U1, class U2> pair(const pair<U1, U2> &p);
421
422        T first;
423        U second;
424    };
425    %enddef
426
427
428    specialize_std_pair_on_first(bool,SCHEME_BOOLP,
429                              SCHEME_TRUEP,swig_make_boolean);
430    specialize_std_pair_on_first(int,SCHEME_INTP,
431                              SCHEME_INT_VAL,scheme_make_integer_value);
432    specialize_std_pair_on_first(short,SCHEME_INTP,
433                              SCHEME_INT_VAL,scheme_make_integer_value);
434    specialize_std_pair_on_first(long,SCHEME_INTP,
435                              SCHEME_INT_VAL,scheme_make_integer_value);
436    specialize_std_pair_on_first(unsigned int,SCHEME_INTP,
437                              SCHEME_INT_VAL,scheme_make_integer_value);
438    specialize_std_pair_on_first(unsigned short,SCHEME_INTP,
439                              SCHEME_INT_VAL,scheme_make_integer_value);
440    specialize_std_pair_on_first(unsigned long,SCHEME_INTP,
441                              SCHEME_INT_VAL,scheme_make_integer_value);
442    specialize_std_pair_on_first(double,SCHEME_REALP,
443                              scheme_real_to_double,scheme_make_double);
444    specialize_std_pair_on_first(float,SCHEME_REALP,
445                              scheme_real_to_double,scheme_make_double);
446    specialize_std_pair_on_first(std::string,SCHEME_STRINGP,
447                              swig_scm_to_string,swig_make_string);
448
449    specialize_std_pair_on_second(bool,SCHEME_BOOLP,
450                                SCHEME_TRUEP,swig_make_boolean);
451    specialize_std_pair_on_second(int,SCHEME_INTP,
452                                SCHEME_INT_VAL,scheme_make_integer_value);
453    specialize_std_pair_on_second(short,SCHEME_INTP,
454                                SCHEME_INT_VAL,scheme_make_integer_value);
455    specialize_std_pair_on_second(long,SCHEME_INTP,
456                                SCHEME_INT_VAL,scheme_make_integer_value);
457    specialize_std_pair_on_second(unsigned int,SCHEME_INTP,
458                                SCHEME_INT_VAL,scheme_make_integer_value);
459    specialize_std_pair_on_second(unsigned short,SCHEME_INTP,
460                                SCHEME_INT_VAL,scheme_make_integer_value);
461    specialize_std_pair_on_second(unsigned long,SCHEME_INTP,
462                                SCHEME_INT_VAL,scheme_make_integer_value);
463    specialize_std_pair_on_second(double,SCHEME_REALP,
464                                scheme_real_to_double,scheme_make_double);
465    specialize_std_pair_on_second(float,SCHEME_REALP,
466                                scheme_real_to_double,scheme_make_double);
467    specialize_std_pair_on_second(std::string,SCHEME_STRINGP,
468                                swig_scm_to_string,swig_make_string);
469
470    specialize_std_pair_on_both(bool,SCHEME_BOOLP,
471                               SCHEME_TRUEP,swig_make_boolean,
472                               bool,SCHEME_BOOLP,
473                               SCHEME_TRUEP,swig_make_boolean);
474    specialize_std_pair_on_both(bool,SCHEME_BOOLP,
475                               SCHEME_TRUEP,swig_make_boolean,
476                               int,SCHEME_INTP,
477                               SCHEME_INT_VAL,scheme_make_integer_value);
478    specialize_std_pair_on_both(bool,SCHEME_BOOLP,
479                               SCHEME_TRUEP,swig_make_boolean,
480                               short,SCHEME_INTP,
481                               SCHEME_INT_VAL,scheme_make_integer_value);
482    specialize_std_pair_on_both(bool,SCHEME_BOOLP,
483                               SCHEME_TRUEP,swig_make_boolean,
484                               long,SCHEME_INTP,
485                               SCHEME_INT_VAL,scheme_make_integer_value);
486    specialize_std_pair_on_both(bool,SCHEME_BOOLP,
487                               SCHEME_TRUEP,swig_make_boolean,
488                               unsigned int,SCHEME_INTP,
489                               SCHEME_INT_VAL,scheme_make_integer_value);
490    specialize_std_pair_on_both(bool,SCHEME_BOOLP,
491                               SCHEME_TRUEP,swig_make_boolean,
492                               unsigned short,SCHEME_INTP,
493                               SCHEME_INT_VAL,scheme_make_integer_value);
494    specialize_std_pair_on_both(bool,SCHEME_BOOLP,
495                               SCHEME_TRUEP,swig_make_boolean,
496                               unsigned long,SCHEME_INTP,
497                               SCHEME_INT_VAL,scheme_make_integer_value);
498    specialize_std_pair_on_both(bool,SCHEME_BOOLP,
499                               SCHEME_TRUEP,swig_make_boolean,
500                               double,SCHEME_REALP,
501                               scheme_real_to_double,scheme_make_double);
502    specialize_std_pair_on_both(bool,SCHEME_BOOLP,
503                               SCHEME_TRUEP,swig_make_boolean,
504                               float,SCHEME_REALP,
505                               scheme_real_to_double,scheme_make_double);
506    specialize_std_pair_on_both(bool,SCHEME_BOOLP,
507                               SCHEME_TRUEP,swig_make_boolean,
508                               std::string,SCHEME_STRINGP,
509                               swig_scm_to_string,swig_make_string);
510    specialize_std_pair_on_both(int,SCHEME_INTP,
511                               SCHEME_INT_VAL,scheme_make_integer_value,
512                               bool,SCHEME_BOOLP,
513                               SCHEME_TRUEP,swig_make_boolean);
514    specialize_std_pair_on_both(int,SCHEME_INTP,
515                               SCHEME_INT_VAL,scheme_make_integer_value,
516                               int,SCHEME_INTP,
517                               SCHEME_INT_VAL,scheme_make_integer_value);
518    specialize_std_pair_on_both(int,SCHEME_INTP,
519                               SCHEME_INT_VAL,scheme_make_integer_value,
520                               short,SCHEME_INTP,
521                               SCHEME_INT_VAL,scheme_make_integer_value);
522    specialize_std_pair_on_both(int,SCHEME_INTP,
523                               SCHEME_INT_VAL,scheme_make_integer_value,
524                               long,SCHEME_INTP,
525                               SCHEME_INT_VAL,scheme_make_integer_value);
526    specialize_std_pair_on_both(int,SCHEME_INTP,
527                               SCHEME_INT_VAL,scheme_make_integer_value,
528                               unsigned int,SCHEME_INTP,
529                               SCHEME_INT_VAL,scheme_make_integer_value);
530    specialize_std_pair_on_both(int,SCHEME_INTP,
531                               SCHEME_INT_VAL,scheme_make_integer_value,
532                               unsigned short,SCHEME_INTP,
533                               SCHEME_INT_VAL,scheme_make_integer_value);
534    specialize_std_pair_on_both(int,SCHEME_INTP,
535                               SCHEME_INT_VAL,scheme_make_integer_value,
536                               unsigned long,SCHEME_INTP,
537                               SCHEME_INT_VAL,scheme_make_integer_value);
538    specialize_std_pair_on_both(int,SCHEME_INTP,
539                               SCHEME_INT_VAL,scheme_make_integer_value,
540                               double,SCHEME_REALP,
541                               scheme_real_to_double,scheme_make_double);
542    specialize_std_pair_on_both(int,SCHEME_INTP,
543                               SCHEME_INT_VAL,scheme_make_integer_value,
544                               float,SCHEME_REALP,
545                               scheme_real_to_double,scheme_make_double);
546    specialize_std_pair_on_both(int,SCHEME_INTP,
547                               SCHEME_INT_VAL,scheme_make_integer_value,
548                               std::string,SCHEME_STRINGP,
549                               swig_scm_to_string,swig_make_string);
550    specialize_std_pair_on_both(short,SCHEME_INTP,
551                               SCHEME_INT_VAL,scheme_make_integer_value,
552                               bool,SCHEME_BOOLP,
553                               SCHEME_TRUEP,swig_make_boolean);
554    specialize_std_pair_on_both(short,SCHEME_INTP,
555                               SCHEME_INT_VAL,scheme_make_integer_value,
556                               int,SCHEME_INTP,
557                               SCHEME_INT_VAL,scheme_make_integer_value);
558    specialize_std_pair_on_both(short,SCHEME_INTP,
559                               SCHEME_INT_VAL,scheme_make_integer_value,
560                               short,SCHEME_INTP,
561                               SCHEME_INT_VAL,scheme_make_integer_value);
562    specialize_std_pair_on_both(short,SCHEME_INTP,
563                               SCHEME_INT_VAL,scheme_make_integer_value,
564                               long,SCHEME_INTP,
565                               SCHEME_INT_VAL,scheme_make_integer_value);
566    specialize_std_pair_on_both(short,SCHEME_INTP,
567                               SCHEME_INT_VAL,scheme_make_integer_value,
568                               unsigned int,SCHEME_INTP,
569                               SCHEME_INT_VAL,scheme_make_integer_value);
570    specialize_std_pair_on_both(short,SCHEME_INTP,
571                               SCHEME_INT_VAL,scheme_make_integer_value,
572                               unsigned short,SCHEME_INTP,
573                               SCHEME_INT_VAL,scheme_make_integer_value);
574    specialize_std_pair_on_both(short,SCHEME_INTP,
575                               SCHEME_INT_VAL,scheme_make_integer_value,
576                               unsigned long,SCHEME_INTP,
577                               SCHEME_INT_VAL,scheme_make_integer_value);
578    specialize_std_pair_on_both(short,SCHEME_INTP,
579                               SCHEME_INT_VAL,scheme_make_integer_value,
580                               double,SCHEME_REALP,
581                               scheme_real_to_double,scheme_make_double);
582    specialize_std_pair_on_both(short,SCHEME_INTP,
583                               SCHEME_INT_VAL,scheme_make_integer_value,
584                               float,SCHEME_REALP,
585                               scheme_real_to_double,scheme_make_double);
586    specialize_std_pair_on_both(short,SCHEME_INTP,
587                               SCHEME_INT_VAL,scheme_make_integer_value,
588                               std::string,SCHEME_STRINGP,
589                               swig_scm_to_string,swig_make_string);
590    specialize_std_pair_on_both(long,SCHEME_INTP,
591                               SCHEME_INT_VAL,scheme_make_integer_value,
592                               bool,SCHEME_BOOLP,
593                               SCHEME_TRUEP,swig_make_boolean);
594    specialize_std_pair_on_both(long,SCHEME_INTP,
595                               SCHEME_INT_VAL,scheme_make_integer_value,
596                               int,SCHEME_INTP,
597                               SCHEME_INT_VAL,scheme_make_integer_value);
598    specialize_std_pair_on_both(long,SCHEME_INTP,
599                               SCHEME_INT_VAL,scheme_make_integer_value,
600                               short,SCHEME_INTP,
601                               SCHEME_INT_VAL,scheme_make_integer_value);
602    specialize_std_pair_on_both(long,SCHEME_INTP,
603                               SCHEME_INT_VAL,scheme_make_integer_value,
604                               long,SCHEME_INTP,
605                               SCHEME_INT_VAL,scheme_make_integer_value);
606    specialize_std_pair_on_both(long,SCHEME_INTP,
607                               SCHEME_INT_VAL,scheme_make_integer_value,
608                               unsigned int,SCHEME_INTP,
609                               SCHEME_INT_VAL,scheme_make_integer_value);
610    specialize_std_pair_on_both(long,SCHEME_INTP,
611                               SCHEME_INT_VAL,scheme_make_integer_value,
612                               unsigned short,SCHEME_INTP,
613                               SCHEME_INT_VAL,scheme_make_integer_value);
614    specialize_std_pair_on_both(long,SCHEME_INTP,
615                               SCHEME_INT_VAL,scheme_make_integer_value,
616                               unsigned long,SCHEME_INTP,
617                               SCHEME_INT_VAL,scheme_make_integer_value);
618    specialize_std_pair_on_both(long,SCHEME_INTP,
619                               SCHEME_INT_VAL,scheme_make_integer_value,
620                               double,SCHEME_REALP,
621                               scheme_real_to_double,scheme_make_double);
622    specialize_std_pair_on_both(long,SCHEME_INTP,
623                               SCHEME_INT_VAL,scheme_make_integer_value,
624                               float,SCHEME_REALP,
625                               scheme_real_to_double,scheme_make_double);
626    specialize_std_pair_on_both(long,SCHEME_INTP,
627                               SCHEME_INT_VAL,scheme_make_integer_value,
628                               std::string,SCHEME_STRINGP,
629                               swig_scm_to_string,swig_make_string);
630    specialize_std_pair_on_both(unsigned int,SCHEME_INTP,
631                               SCHEME_INT_VAL,scheme_make_integer_value,
632                               bool,SCHEME_BOOLP,
633                               SCHEME_TRUEP,swig_make_boolean);
634    specialize_std_pair_on_both(unsigned int,SCHEME_INTP,
635                               SCHEME_INT_VAL,scheme_make_integer_value,
636                               int,SCHEME_INTP,
637                               SCHEME_INT_VAL,scheme_make_integer_value);
638    specialize_std_pair_on_both(unsigned int,SCHEME_INTP,
639                               SCHEME_INT_VAL,scheme_make_integer_value,
640                               short,SCHEME_INTP,
641                               SCHEME_INT_VAL,scheme_make_integer_value);
642    specialize_std_pair_on_both(unsigned int,SCHEME_INTP,
643                               SCHEME_INT_VAL,scheme_make_integer_value,
644                               long,SCHEME_INTP,
645                               SCHEME_INT_VAL,scheme_make_integer_value);
646    specialize_std_pair_on_both(unsigned int,SCHEME_INTP,
647                               SCHEME_INT_VAL,scheme_make_integer_value,
648                               unsigned int,SCHEME_INTP,
649                               SCHEME_INT_VAL,scheme_make_integer_value);
650    specialize_std_pair_on_both(unsigned int,SCHEME_INTP,
651                               SCHEME_INT_VAL,scheme_make_integer_value,
652                               unsigned short,SCHEME_INTP,
653                               SCHEME_INT_VAL,scheme_make_integer_value);
654    specialize_std_pair_on_both(unsigned int,SCHEME_INTP,
655                               SCHEME_INT_VAL,scheme_make_integer_value,
656                               unsigned long,SCHEME_INTP,
657                               SCHEME_INT_VAL,scheme_make_integer_value);
658    specialize_std_pair_on_both(unsigned int,SCHEME_INTP,
659                               SCHEME_INT_VAL,scheme_make_integer_value,
660                               double,SCHEME_REALP,
661                               scheme_real_to_double,scheme_make_double);
662    specialize_std_pair_on_both(unsigned int,SCHEME_INTP,
663                               SCHEME_INT_VAL,scheme_make_integer_value,
664                               float,SCHEME_REALP,
665                               scheme_real_to_double,scheme_make_double);
666    specialize_std_pair_on_both(unsigned int,SCHEME_INTP,
667                               SCHEME_INT_VAL,scheme_make_integer_value,
668                               std::string,SCHEME_STRINGP,
669                               swig_scm_to_string,swig_make_string);
670    specialize_std_pair_on_both(unsigned short,SCHEME_INTP,
671                               SCHEME_INT_VAL,scheme_make_integer_value,
672                               bool,SCHEME_BOOLP,
673                               SCHEME_TRUEP,swig_make_boolean);
674    specialize_std_pair_on_both(unsigned short,SCHEME_INTP,
675                               SCHEME_INT_VAL,scheme_make_integer_value,
676                               int,SCHEME_INTP,
677                               SCHEME_INT_VAL,scheme_make_integer_value);
678    specialize_std_pair_on_both(unsigned short,SCHEME_INTP,
679                               SCHEME_INT_VAL,scheme_make_integer_value,
680                               short,SCHEME_INTP,
681                               SCHEME_INT_VAL,scheme_make_integer_value);
682    specialize_std_pair_on_both(unsigned short,SCHEME_INTP,
683                               SCHEME_INT_VAL,scheme_make_integer_value,
684                               long,SCHEME_INTP,
685                               SCHEME_INT_VAL,scheme_make_integer_value);
686    specialize_std_pair_on_both(unsigned short,SCHEME_INTP,
687                               SCHEME_INT_VAL,scheme_make_integer_value,
688                               unsigned int,SCHEME_INTP,
689                               SCHEME_INT_VAL,scheme_make_integer_value);
690    specialize_std_pair_on_both(unsigned short,SCHEME_INTP,
691                               SCHEME_INT_VAL,scheme_make_integer_value,
692                               unsigned short,SCHEME_INTP,
693                               SCHEME_INT_VAL,scheme_make_integer_value);
694    specialize_std_pair_on_both(unsigned short,SCHEME_INTP,
695                               SCHEME_INT_VAL,scheme_make_integer_value,
696                               unsigned long,SCHEME_INTP,
697                               SCHEME_INT_VAL,scheme_make_integer_value);
698    specialize_std_pair_on_both(unsigned short,SCHEME_INTP,
699                               SCHEME_INT_VAL,scheme_make_integer_value,
700                               double,SCHEME_REALP,
701                               scheme_real_to_double,scheme_make_double);
702    specialize_std_pair_on_both(unsigned short,SCHEME_INTP,
703                               SCHEME_INT_VAL,scheme_make_integer_value,
704                               float,SCHEME_REALP,
705                               scheme_real_to_double,scheme_make_double);
706    specialize_std_pair_on_both(unsigned short,SCHEME_INTP,
707                               SCHEME_INT_VAL,scheme_make_integer_value,
708                               std::string,SCHEME_STRINGP,
709                               swig_scm_to_string,swig_make_string);
710    specialize_std_pair_on_both(unsigned long,SCHEME_INTP,
711                               SCHEME_INT_VAL,scheme_make_integer_value,
712                               bool,SCHEME_BOOLP,
713                               SCHEME_TRUEP,swig_make_boolean);
714    specialize_std_pair_on_both(unsigned long,SCHEME_INTP,
715                               SCHEME_INT_VAL,scheme_make_integer_value,
716                               int,SCHEME_INTP,
717                               SCHEME_INT_VAL,scheme_make_integer_value);
718    specialize_std_pair_on_both(unsigned long,SCHEME_INTP,
719                               SCHEME_INT_VAL,scheme_make_integer_value,
720                               short,SCHEME_INTP,
721                               SCHEME_INT_VAL,scheme_make_integer_value);
722    specialize_std_pair_on_both(unsigned long,SCHEME_INTP,
723                               SCHEME_INT_VAL,scheme_make_integer_value,
724                               long,SCHEME_INTP,
725                               SCHEME_INT_VAL,scheme_make_integer_value);
726    specialize_std_pair_on_both(unsigned long,SCHEME_INTP,
727                               SCHEME_INT_VAL,scheme_make_integer_value,
728                               unsigned int,SCHEME_INTP,
729                               SCHEME_INT_VAL,scheme_make_integer_value);
730    specialize_std_pair_on_both(unsigned long,SCHEME_INTP,
731                               SCHEME_INT_VAL,scheme_make_integer_value,
732                               unsigned short,SCHEME_INTP,
733                               SCHEME_INT_VAL,scheme_make_integer_value);
734    specialize_std_pair_on_both(unsigned long,SCHEME_INTP,
735                               SCHEME_INT_VAL,scheme_make_integer_value,
736                               unsigned long,SCHEME_INTP,
737                               SCHEME_INT_VAL,scheme_make_integer_value);
738    specialize_std_pair_on_both(unsigned long,SCHEME_INTP,
739                               SCHEME_INT_VAL,scheme_make_integer_value,
740                               double,SCHEME_REALP,
741                               scheme_real_to_double,scheme_make_double);
742    specialize_std_pair_on_both(unsigned long,SCHEME_INTP,
743                               SCHEME_INT_VAL,scheme_make_integer_value,
744                               float,SCHEME_REALP,
745                               scheme_real_to_double,scheme_make_double);
746    specialize_std_pair_on_both(unsigned long,SCHEME_INTP,
747                               SCHEME_INT_VAL,scheme_make_integer_value,
748                               std::string,SCHEME_STRINGP,
749                               swig_scm_to_string,swig_make_string);
750    specialize_std_pair_on_both(double,SCHEME_REALP,
751                               scheme_real_to_double,scheme_make_double,
752                               bool,SCHEME_BOOLP,
753                               SCHEME_TRUEP,swig_make_boolean);
754    specialize_std_pair_on_both(double,SCHEME_REALP,
755                               scheme_real_to_double,scheme_make_double,
756                               int,SCHEME_INTP,
757                               SCHEME_INT_VAL,scheme_make_integer_value);
758    specialize_std_pair_on_both(double,SCHEME_REALP,
759                               scheme_real_to_double,scheme_make_double,
760                               short,SCHEME_INTP,
761                               SCHEME_INT_VAL,scheme_make_integer_value);
762    specialize_std_pair_on_both(double,SCHEME_REALP,
763                               scheme_real_to_double,scheme_make_double,
764                               long,SCHEME_INTP,
765                               SCHEME_INT_VAL,scheme_make_integer_value);
766    specialize_std_pair_on_both(double,SCHEME_REALP,
767                               scheme_real_to_double,scheme_make_double,
768                               unsigned int,SCHEME_INTP,
769                               SCHEME_INT_VAL,scheme_make_integer_value);
770    specialize_std_pair_on_both(double,SCHEME_REALP,
771                               scheme_real_to_double,scheme_make_double,
772                               unsigned short,SCHEME_INTP,
773                               SCHEME_INT_VAL,scheme_make_integer_value);
774    specialize_std_pair_on_both(double,SCHEME_REALP,
775                               scheme_real_to_double,scheme_make_double,
776                               unsigned long,SCHEME_INTP,
777                               SCHEME_INT_VAL,scheme_make_integer_value);
778    specialize_std_pair_on_both(double,SCHEME_REALP,
779                               scheme_real_to_double,scheme_make_double,
780                               double,SCHEME_REALP,
781                               scheme_real_to_double,scheme_make_double);
782    specialize_std_pair_on_both(double,SCHEME_REALP,
783                               scheme_real_to_double,scheme_make_double,
784                               float,SCHEME_REALP,
785                               scheme_real_to_double,scheme_make_double);
786    specialize_std_pair_on_both(double,SCHEME_REALP,
787                               scheme_real_to_double,scheme_make_double,
788                               std::string,SCHEME_STRINGP,
789                               swig_scm_to_string,swig_make_string);
790    specialize_std_pair_on_both(float,SCHEME_REALP,
791                               scheme_real_to_double,scheme_make_double,
792                               bool,SCHEME_BOOLP,
793                               SCHEME_TRUEP,swig_make_boolean);
794    specialize_std_pair_on_both(float,SCHEME_REALP,
795                               scheme_real_to_double,scheme_make_double,
796                               int,SCHEME_INTP,
797                               SCHEME_INT_VAL,scheme_make_integer_value);
798    specialize_std_pair_on_both(float,SCHEME_REALP,
799                               scheme_real_to_double,scheme_make_double,
800                               short,SCHEME_INTP,
801                               SCHEME_INT_VAL,scheme_make_integer_value);
802    specialize_std_pair_on_both(float,SCHEME_REALP,
803                               scheme_real_to_double,scheme_make_double,
804                               long,SCHEME_INTP,
805                               SCHEME_INT_VAL,scheme_make_integer_value);
806    specialize_std_pair_on_both(float,SCHEME_REALP,
807                               scheme_real_to_double,scheme_make_double,
808                               unsigned int,SCHEME_INTP,
809                               SCHEME_INT_VAL,scheme_make_integer_value);
810    specialize_std_pair_on_both(float,SCHEME_REALP,
811                               scheme_real_to_double,scheme_make_double,
812                               unsigned short,SCHEME_INTP,
813                               SCHEME_INT_VAL,scheme_make_integer_value);
814    specialize_std_pair_on_both(float,SCHEME_REALP,
815                               scheme_real_to_double,scheme_make_double,
816                               unsigned long,SCHEME_INTP,
817                               SCHEME_INT_VAL,scheme_make_integer_value);
818    specialize_std_pair_on_both(float,SCHEME_REALP,
819                               scheme_real_to_double,scheme_make_double,
820                               double,SCHEME_REALP,
821                               scheme_real_to_double,scheme_make_double);
822    specialize_std_pair_on_both(float,SCHEME_REALP,
823                               scheme_real_to_double,scheme_make_double,
824                               float,SCHEME_REALP,
825                               scheme_real_to_double,scheme_make_double);
826    specialize_std_pair_on_both(float,SCHEME_REALP,
827                               scheme_real_to_double,scheme_make_double,
828                               std::string,SCHEME_STRINGP,
829                               swig_scm_to_string,swig_make_string);
830    specialize_std_pair_on_both(std::string,SCHEME_STRINGP,
831                               swig_scm_to_string,swig_make_string,
832                               bool,SCHEME_BOOLP,
833                               SCHEME_TRUEP,swig_make_boolean);
834    specialize_std_pair_on_both(std::string,SCHEME_STRINGP,
835                               swig_scm_to_string,swig_make_string,
836                               int,SCHEME_INTP,
837                               SCHEME_INT_VAL,scheme_make_integer_value);
838    specialize_std_pair_on_both(std::string,SCHEME_STRINGP,
839                               swig_scm_to_string,swig_make_string,
840                               short,SCHEME_INTP,
841                               SCHEME_INT_VAL,scheme_make_integer_value);
842    specialize_std_pair_on_both(std::string,SCHEME_STRINGP,
843                               swig_scm_to_string,swig_make_string,
844                               long,SCHEME_INTP,
845                               SCHEME_INT_VAL,scheme_make_integer_value);
846    specialize_std_pair_on_both(std::string,SCHEME_STRINGP,
847                               swig_scm_to_string,swig_make_string,
848                               unsigned int,SCHEME_INTP,
849                               SCHEME_INT_VAL,scheme_make_integer_value);
850    specialize_std_pair_on_both(std::string,SCHEME_STRINGP,
851                               swig_scm_to_string,swig_make_string,
852                               unsigned short,SCHEME_INTP,
853                               SCHEME_INT_VAL,scheme_make_integer_value);
854    specialize_std_pair_on_both(std::string,SCHEME_STRINGP,
855                               swig_scm_to_string,swig_make_string,
856                               unsigned long,SCHEME_INTP,
857                               SCHEME_INT_VAL,scheme_make_integer_value);
858    specialize_std_pair_on_both(std::string,SCHEME_STRINGP,
859                               swig_scm_to_string,swig_make_string,
860                               double,SCHEME_REALP,
861                               scheme_real_to_double,scheme_make_double);
862    specialize_std_pair_on_both(std::string,SCHEME_STRINGP,
863                               swig_scm_to_string,swig_make_string,
864                               float,SCHEME_REALP,
865                               scheme_real_to_double,scheme_make_double);
866    specialize_std_pair_on_both(std::string,SCHEME_STRINGP,
867                               swig_scm_to_string,swig_make_string,
868                               std::string,SCHEME_STRINGP,
869                               swig_scm_to_string,swig_make_string);
870}