PageRenderTime 36ms CodeModel.GetById 14ms app.highlight 11ms RepoModel.GetById 2ms app.codeStats 0ms

/trunk/Lib/mzscheme/std_map.i

#
Swig | 1348 lines | 1309 code | 20 blank | 19 comment | 0 complexity | aa7f401f3ed991c980c8260f44266db8 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1/* -----------------------------------------------------------------------------
   2 * std_map.i
   3 *
   4 * SWIG typemaps for std::map
   5 * ----------------------------------------------------------------------------- */
   6
   7%include <std_common.i>
   8
   9// ------------------------------------------------------------------------
  10// std::map
  11//
  12// The aim of all that follows would be to integrate std::map with
  13// MzScheme as much as possible, namely, to allow the user to pass and
  14// be returned Scheme association lists.
  15// const declarations are used to guess the intent of the function being
  16// exported; therefore, the following rationale is applied:
  17//
  18//   -- f(std::map<T>), f(const std::map<T>&), f(const std::map<T>*):
  19//      the parameter being read-only, either a Scheme alist or a
  20//      previously wrapped std::map<T> can be passed.
  21//   -- f(std::map<T>&), f(std::map<T>*):
  22//      the parameter must be modified; therefore, only a wrapped std::map
  23//      can be passed.
  24//   -- std::map<T> f():
  25//      the map is returned by copy; therefore, a Scheme alist
  26//      is returned which is most easily used in other Scheme functions
  27//   -- std::map<T>& f(), std::map<T>* f(), const std::map<T>& f(),
  28//      const std::map<T>* f():
  29//      the map is returned by reference; therefore, a wrapped std::map
  30//      is returned
  31// ------------------------------------------------------------------------
  32
  33%{
  34#include <map>
  35#include <algorithm>
  36#include <stdexcept>
  37%}
  38
  39// exported class
  40
  41namespace std {
  42
  43    template<class K, class T> class map {
  44        %typemap(in) map<K,T> (std::map<K,T>* m) {
  45            if (SCHEME_NULLP($input)) {
  46                $1 = std::map<K,T >();
  47            } else if (SCHEME_PAIRP($input)) {
  48                $1 = std::map<K,T >();
  49                Scheme_Object* alist = $input;
  50                while (!SCHEME_NULLP(alist)) {
  51                    K* k;
  52                    T* x;
  53                    Scheme_Object *entry, *key, *val;
  54                    entry = scheme_car(alist);
  55                    if (!SCHEME_PAIRP(entry))
  56                        SWIG_exception(SWIG_TypeError,"alist expected");
  57                    key = scheme_car(entry);
  58                    val = scheme_cdr(entry);
  59                    k = (K*) SWIG_MustGetPtr(key,$descriptor(K *),$argnum, 0);
  60                    if (SWIG_ConvertPtr(val,(void**) &x,
  61                                    $descriptor(T *), 0) == -1) {
  62                        if (!SCHEME_PAIRP(val))
  63                            SWIG_exception(SWIG_TypeError,"alist expected");
  64                        val = scheme_car(val);
  65                        x = (T*) SWIG_MustGetPtr(val,$descriptor(T *),$argnum, 0);
  66                    }
  67                    (($1_type &)$1)[*k] = *x;
  68                    alist = scheme_cdr(alist);
  69                }
  70            } else {
  71                $1 = *(($&1_type)
  72                       SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0));
  73            }
  74        }
  75        %typemap(in) const map<K,T>& (std::map<K,T> temp,
  76                                      std::map<K,T>* m),
  77                     const map<K,T>* (std::map<K,T> temp,
  78                                      std::map<K,T>* m) {
  79            if (SCHEME_NULLP($input)) {
  80                temp = std::map<K,T >();
  81                $1 = &temp;
  82            } else if (SCHEME_PAIRP($input)) {
  83                temp = std::map<K,T >();
  84                $1 = &temp;
  85                Scheme_Object* alist = $input;
  86                while (!SCHEME_NULLP(alist)) {
  87                    K* k;
  88                    T* x;
  89                    Scheme_Object *entry, *key, *val;
  90                    entry = scheme_car(alist);
  91                    if (!SCHEME_PAIRP(entry))
  92                        SWIG_exception(SWIG_TypeError,"alist expected");
  93                    key = scheme_car(entry);
  94                    val = scheme_cdr(entry);
  95                    k = (K*) SWIG_MustGetPtr(key,$descriptor(K *),$argnum, 0);
  96                    if (SWIG_ConvertPtr(val,(void**) &x,
  97                                    $descriptor(T *), 0) == -1) {
  98                        if (!SCHEME_PAIRP(val))
  99                            SWIG_exception(SWIG_TypeError,"alist expected");
 100                        val = scheme_car(val);
 101                        x = (T*) SWIG_MustGetPtr(val,$descriptor(T *),$argnum, 0);
 102                    }
 103                    temp[*k] = *x;
 104                    alist = scheme_cdr(alist);
 105                }
 106            } else {
 107                $1 = ($1_ltype) SWIG_MustGetPtr($input,$1_descriptor,$argnum, 0);
 108            }
 109        }
 110        %typemap(out) map<K,T> {
 111            Scheme_Object* alist = scheme_null;
 112            for (std::map<K,T >::reverse_iterator i=$1.rbegin(); 
 113                                                  i!=$1.rend(); ++i) {
 114                K* key = new K(i->first);
 115                T* val = new T(i->second);
 116                Scheme_Object* k = SWIG_NewPointerObj(key,$descriptor(K *), 1);
 117                Scheme_Object* x = SWIG_NewPointerObj(val,$descriptor(T *), 1);
 118                Scheme_Object* entry = scheme_make_pair(k,x);
 119                alist = scheme_make_pair(entry,alist);
 120            }
 121            $result = alist;
 122        }
 123        %typecheck(SWIG_TYPECHECK_MAP) map<K,T> {
 124            /* native sequence? */
 125            if (SCHEME_NULLP($input)) {
 126                /* an empty sequence can be of any type */
 127                $1 = 1;
 128            } else if (SCHEME_PAIRP($input)) {
 129                /* check the first element only */
 130                K* k;
 131                T* x;
 132                Scheme_Object* head = scheme_car($input);
 133                if (SCHEME_PAIRP(head)) {
 134                    Scheme_Object* key = scheme_car(head);
 135                    Scheme_Object* val = scheme_cdr(head);
 136                    if (SWIG_ConvertPtr(key,(void**) &k,
 137                                    $descriptor(K *), 0) == -1) {
 138                        $1 = 0;
 139                    } else {
 140                        if (SWIG_ConvertPtr(val,(void**) &x,
 141                                        $descriptor(T *), 0) != -1) {
 142                            $1 = 1;
 143                        } else if (SCHEME_PAIRP(val)) {
 144                            val = scheme_car(val);
 145                            if (SWIG_ConvertPtr(val,(void**) &x,
 146                                            $descriptor(T *), 0) != -1)
 147                                $1 = 1;
 148                            else
 149                                $1 = 0;
 150                        } else {
 151                            $1 = 0;
 152                        }
 153                    }
 154                } else {
 155                    $1 = 0;
 156                }
 157            } else {
 158                /* wrapped map? */
 159                std::map<K,T >* m;
 160                if (SWIG_ConvertPtr($input,(void **) &m,
 161                                $&1_descriptor, 0) != -1)
 162                    $1 = 1;
 163                else
 164                    $1 = 0;
 165            }
 166        }
 167        %typecheck(SWIG_TYPECHECK_MAP) const map<K,T>&,
 168                                       const map<K,T>* {
 169            /* native sequence? */
 170            if (SCHEME_NULLP($input)) {
 171                /* an empty sequence can be of any type */
 172                $1 = 1;
 173            } else if (SCHEME_PAIRP($input)) {
 174                /* check the first element only */
 175                K* k;
 176                T* x;
 177                Scheme_Object* head = scheme_car($input);
 178                if (SCHEME_PAIRP(head)) {
 179                    Scheme_Object* key = scheme_car(head);
 180                    Scheme_Object* val = scheme_cdr(head);
 181                    if (SWIG_ConvertPtr(key,(void**) &k,
 182                                    $descriptor(K *), 0) == -1) {
 183                        $1 = 0;
 184                    } else {
 185                        if (SWIG_ConvertPtr(val,(void**) &x,
 186                                        $descriptor(T *), 0) != -1) {
 187                            $1 = 1;
 188                        } else if (SCHEME_PAIRP(val)) {
 189                            val = scheme_car(val);
 190                            if (SWIG_ConvertPtr(val,(void**) &x,
 191                                            $descriptor(T *), 0) != -1)
 192                                $1 = 1;
 193                            else
 194                                $1 = 0;
 195                        } else {
 196                            $1 = 0;
 197                        }
 198                    }
 199                } else {
 200                    $1 = 0;
 201                }
 202            } else {
 203                /* wrapped map? */
 204                std::map<K,T >* m;
 205                if (SWIG_ConvertPtr($input,(void **) &m,
 206                                $1_descriptor, 0) != -1)
 207                    $1 = 1;
 208                else
 209                    $1 = 0;
 210            }
 211        }
 212        %rename("length") size;
 213        %rename("null?") empty;
 214        %rename("clear!") clear;
 215        %rename("ref") __getitem__;
 216        %rename("set!") __setitem__;
 217        %rename("delete!") __delitem__;
 218        %rename("has-key?") has_key;
 219      public:
 220        map();
 221        map(const map<K,T> &);
 222        
 223        unsigned int size() const;
 224        bool empty() const;
 225        void clear();
 226        %extend {
 227            T& __getitem__(const K& key) throw (std::out_of_range) {
 228                std::map<K,T >::iterator i = self->find(key);
 229                if (i != self->end())
 230                    return i->second;
 231                else
 232                    throw std::out_of_range("key not found");
 233            }
 234            void __setitem__(const K& key, const T& x) {
 235                (*self)[key] = x;
 236            }
 237            void __delitem__(const K& key) throw (std::out_of_range) {
 238                std::map<K,T >::iterator i = self->find(key);
 239                if (i != self->end())
 240                    self->erase(i);
 241                else
 242                    throw std::out_of_range("key not found");
 243            }
 244            bool has_key(const K& key) {
 245                std::map<K,T >::iterator i = self->find(key);
 246                return i != self->end();
 247            }
 248            Scheme_Object* keys() {
 249                Scheme_Object* result = scheme_null;
 250                for (std::map<K,T >::reverse_iterator i=self->rbegin(); 
 251                                                      i!=self->rend(); ++i) {
 252                    K* key = new K(i->first);
 253                    Scheme_Object* k = SWIG_NewPointerObj(key,$descriptor(K *), 1);
 254                    result = scheme_make_pair(k,result);
 255                }
 256                return result;
 257            }
 258        }
 259    };
 260
 261
 262    // specializations for built-ins
 263
 264    %define specialize_std_map_on_key(K,CHECK,CONVERT_FROM,CONVERT_TO)
 265
 266    template<class T> class map<K,T> {
 267        %typemap(in) map<K,T> (std::map<K,T>* m) {
 268            if (SCHEME_NULLP($input)) {
 269                $1 = std::map<K,T >();
 270            } else if (SCHEME_PAIRP($input)) {
 271                $1 = std::map<K,T >();
 272                Scheme_Object* alist = $input;
 273                while (!SCHEME_NULLP(alist)) {
 274                    T* x;
 275                    Scheme_Object *entry, *key, *val;
 276                    entry = scheme_car(alist);
 277                    if (!SCHEME_PAIRP(entry))
 278                        SWIG_exception(SWIG_TypeError,"alist expected");
 279                    key = scheme_car(entry);
 280                    val = scheme_cdr(entry);
 281                    if (!CHECK(key))
 282                        SWIG_exception(SWIG_TypeError,
 283                                       "map<" #K "," #T "> expected");
 284                    if (SWIG_ConvertPtr(val,(void**) &x,
 285                                    $descriptor(T *), 0) == -1) {
 286                        if (!SCHEME_PAIRP(val))
 287                            SWIG_exception(SWIG_TypeError,"alist expected");
 288                        val = scheme_car(val);
 289                        x = (T*) SWIG_MustGetPtr(val,$descriptor(T *),$argnum, 0);
 290                    }
 291                    (($1_type &)$1)[CONVERT_FROM(key)] = *x;
 292                    alist = scheme_cdr(alist);
 293                }
 294            } else {
 295                $1 = *(($&1_type)
 296                       SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0));
 297            }
 298        }
 299        %typemap(in) const map<K,T>& (std::map<K,T> temp,
 300                                      std::map<K,T>* m),
 301                     const map<K,T>* (std::map<K,T> temp,
 302                                      std::map<K,T>* m) {
 303            if (SCHEME_NULLP($input)) {
 304                temp = std::map<K,T >();
 305                $1 = &temp;
 306            } else if (SCHEME_PAIRP($input)) {
 307                temp = std::map<K,T >();
 308                $1 = &temp;
 309                Scheme_Object* alist = $input;
 310                while (!SCHEME_NULLP(alist)) {
 311                    T* x;
 312                    Scheme_Object *entry, *key, *val;
 313                    entry = scheme_car(alist);
 314                    if (!SCHEME_PAIRP(entry))
 315                        SWIG_exception(SWIG_TypeError,"alist expected");
 316                    key = scheme_car(entry);
 317                    val = scheme_cdr(entry);
 318                    if (!CHECK(key))
 319                        SWIG_exception(SWIG_TypeError,
 320                                       "map<" #K "," #T "> expected");
 321                    if (SWIG_ConvertPtr(val,(void**) &x,
 322                                    $descriptor(T *), 0) == -1) {
 323                        if (!SCHEME_PAIRP(val))
 324                            SWIG_exception(SWIG_TypeError,"alist expected");
 325                        val = scheme_car(val);
 326                        x = (T*) SWIG_MustGetPtr(val,$descriptor(T *),$argnum, 0);
 327                    }
 328                    temp[CONVERT_FROM(key)] = *x;
 329                    alist = scheme_cdr(alist);
 330                }
 331            } else {
 332                $1 = ($1_ltype) SWIG_MustGetPtr($input,$1_descriptor,$argnum, 0);
 333            }
 334        }
 335        %typemap(out) map<K,T> {
 336            Scheme_Object* alist = scheme_null;
 337            for (std::map<K,T >::reverse_iterator i=$1.rbegin(); 
 338                                                  i!=$1.rend(); ++i) {
 339                T* val = new T(i->second);
 340                Scheme_Object* k = CONVERT_TO(i->first);
 341                Scheme_Object* x = SWIG_NewPointerObj(val,$descriptor(T *), 1);
 342                Scheme_Object* entry = scheme_make_pair(k,x);
 343                alist = scheme_make_pair(entry,alist);
 344            }
 345            $result = alist;
 346        }
 347        %typecheck(SWIG_TYPECHECK_MAP) map<K,T> {
 348            // native sequence?
 349            if (SCHEME_NULLP($input)) {
 350                /* an empty sequence can be of any type */
 351                $1 = 1;
 352            } else if (SCHEME_PAIRP($input)) {
 353                // check the first element only
 354                T* x;
 355                Scheme_Object* head = scheme_car($input);
 356                if (SCHEME_PAIRP(head)) {
 357                    Scheme_Object* key = scheme_car(head);
 358                    Scheme_Object* val = scheme_cdr(head);
 359                    if (!CHECK(key)) {
 360                        $1 = 0;
 361                    } else {
 362                        if (SWIG_ConvertPtr(val,(void**) &x,
 363                                        $descriptor(T *), 0) != -1) {
 364                            $1 = 1;
 365                        } else if (SCHEME_PAIRP(val)) {
 366                            val = scheme_car(val);
 367                            if (SWIG_ConvertPtr(val,(void**) &x,
 368                                            $descriptor(T *), 0) != -1)
 369                                $1 = 1;
 370                            else
 371                                $1 = 0;
 372                        } else {
 373                            $1 = 0;
 374                        }
 375                    }
 376                } else {
 377                    $1 = 0;
 378                }
 379            } else {
 380                // wrapped map?
 381                std::map<K,T >* m;
 382                if (SWIG_ConvertPtr($input,(void **) &m,
 383                                $&1_descriptor, 0) != -1)
 384                    $1 = 1;
 385                else
 386                    $1 = 0;
 387            }
 388        }
 389        %typecheck(SWIG_TYPECHECK_MAP) const map<K,T>&,
 390                                       const map<K,T>* {
 391            // native sequence?
 392            if (SCHEME_NULLP($input)) {
 393                /* an empty sequence can be of any type */
 394                $1 = 1;
 395            } else if (SCHEME_PAIRP($input)) {
 396                // check the first element only
 397                T* x;
 398                Scheme_Object* head = scheme_car($input);
 399                if (SCHEME_PAIRP(head)) {
 400                    Scheme_Object* key = scheme_car(head);
 401                    Scheme_Object* val = scheme_cdr(head);
 402                    if (!CHECK(key)) {
 403                        $1 = 0;
 404                    } else {
 405                        if (SWIG_ConvertPtr(val,(void**) &x,
 406                                        $descriptor(T *), 0) != -1) {
 407                            $1 = 1;
 408                        } else if (SCHEME_PAIRP(val)) {
 409                            val = scheme_car(val);
 410                            if (SWIG_ConvertPtr(val,(void**) &x,
 411                                            $descriptor(T *), 0) != -1)
 412                                $1 = 1;
 413                            else
 414                                $1 = 0;
 415                        } else {
 416                            $1 = 0;
 417                        }
 418                    }
 419                } else {
 420                    $1 = 0;
 421                }
 422            } else {
 423                // wrapped map?
 424                std::map<K,T >* m;
 425                if (SWIG_ConvertPtr($input,(void **) &m,
 426                                $1_descriptor, 0) != -1)
 427                    $1 = 1;
 428                else
 429                    $1 = 0;
 430            }
 431        }
 432        %rename("length") size;
 433        %rename("null?") empty;
 434        %rename("clear!") clear;
 435        %rename("ref") __getitem__;
 436        %rename("set!") __setitem__;
 437        %rename("delete!") __delitem__;
 438        %rename("has-key?") has_key;
 439      public:
 440        map();
 441        map(const map<K,T> &);
 442        
 443        unsigned int size() const;
 444        bool empty() const;
 445        void clear();
 446        %extend {
 447            T& __getitem__(K key) throw (std::out_of_range) {
 448                std::map<K,T >::iterator i = self->find(key);
 449                if (i != self->end())
 450                    return i->second;
 451                else
 452                    throw std::out_of_range("key not found");
 453            }
 454            void __setitem__(K key, const T& x) {
 455                (*self)[key] = x;
 456            }
 457            void __delitem__(K key) throw (std::out_of_range) {
 458                std::map<K,T >::iterator i = self->find(key);
 459                if (i != self->end())
 460                    self->erase(i);
 461                else
 462                    throw std::out_of_range("key not found");
 463            }
 464            bool has_key(K key) {
 465                std::map<K,T >::iterator i = self->find(key);
 466                return i != self->end();
 467            }
 468            Scheme_Object* keys() {
 469                Scheme_Object* result = scheme_null;
 470                for (std::map<K,T >::reverse_iterator i=self->rbegin(); 
 471                                                      i!=self->rend(); ++i) {
 472                    Scheme_Object* k = CONVERT_TO(i->first);
 473                    result = scheme_make_pair(k,result);
 474                }
 475                return result;
 476            }
 477        }
 478    };
 479    %enddef
 480
 481    %define specialize_std_map_on_value(T,CHECK,CONVERT_FROM,CONVERT_TO)
 482    template<class K> class map<K,T> {
 483        %typemap(in) map<K,T> (std::map<K,T>* m) {
 484            if (SCHEME_NULLP($input)) {
 485                $1 = std::map<K,T >();
 486            } else if (SCHEME_PAIRP($input)) {
 487                $1 = std::map<K,T >();
 488                Scheme_Object* alist = $input;
 489                while (!SCHEME_NULLP(alist)) {
 490                    K* k;
 491                    Scheme_Object *entry, *key, *val;
 492                    entry = scheme_car(alist);
 493                    if (!SCHEME_PAIRP(entry))
 494                        SWIG_exception(SWIG_TypeError,"alist expected");
 495                    key = scheme_car(entry);
 496                    val = scheme_cdr(entry);
 497                    k = (K*) SWIG_MustGetPtr(key,$descriptor(K *),$argnum, 0);
 498                    if (!CHECK(val)) {
 499                        if (!SCHEME_PAIRP(val))
 500                            SWIG_exception(SWIG_TypeError,"alist expected");
 501                        val = scheme_car(val);
 502                        if (!CHECK(val))
 503                            SWIG_exception(SWIG_TypeError,
 504                                           "map<" #K "," #T "> expected");
 505                    }
 506                    (($1_type &)$1)[*k] = CONVERT_FROM(val);
 507                    alist = scheme_cdr(alist);
 508                }
 509            } else {
 510                $1 = *(($&1_type)
 511                       SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0));
 512            }
 513        }
 514        %typemap(in) const map<K,T>& (std::map<K,T> temp,
 515                                      std::map<K,T>* m),
 516                     const map<K,T>* (std::map<K,T> temp,
 517                                      std::map<K,T>* m) {
 518            if (SCHEME_NULLP($input)) {
 519                temp = std::map<K,T >();
 520                $1 = &temp;
 521            } else if (SCHEME_PAIRP($input)) {
 522                temp = std::map<K,T >();
 523                $1 = &temp;
 524                Scheme_Object* alist = $input;
 525                while (!SCHEME_NULLP(alist)) {
 526                    K* k;
 527                    Scheme_Object *entry, *key, *val;
 528                    entry = scheme_car(alist);
 529                    if (!SCHEME_PAIRP(entry))
 530                        SWIG_exception(SWIG_TypeError,"alist expected");
 531                    key = scheme_car(entry);
 532                    val = scheme_cdr(entry);
 533                    k = (K*) SWIG_MustGetPtr(key,$descriptor(K *),$argnum, 0);
 534                    if (!CHECK(val)) {
 535                        if (!SCHEME_PAIRP(val))
 536                            SWIG_exception(SWIG_TypeError,"alist expected");
 537                        val = scheme_car(val);
 538                        if (!CHECK(val))
 539                            SWIG_exception(SWIG_TypeError,
 540                                           "map<" #K "," #T "> expected");
 541                    }
 542                    temp[*k] = CONVERT_FROM(val);
 543                    alist = scheme_cdr(alist);
 544                }
 545            } else {
 546                $1 = ($1_ltype) SWIG_MustGetPtr($input,$1_descriptor,$argnum, 0);
 547            }
 548        }
 549        %typemap(out) map<K,T> {
 550            Scheme_Object* alist = scheme_null;
 551            for (std::map<K,T >::reverse_iterator i=$1.rbegin(); 
 552                                                  i!=$1.rend(); ++i) {
 553                K* key = new K(i->first);
 554                Scheme_Object* k = SWIG_NewPointerObj(key,$descriptor(K *), 1);
 555                Scheme_Object* x = CONVERT_TO(i->second);
 556                Scheme_Object* entry = scheme_make_pair(k,x);
 557                alist = scheme_make_pair(entry,alist);
 558            }
 559            $result = alist;
 560        }
 561        %typecheck(SWIG_TYPECHECK_MAP) map<K,T> {
 562            // native sequence?
 563            if (SCHEME_NULLP($input)) {
 564                /* an empty sequence can be of any type */
 565                $1 = 1;
 566            } else if (SCHEME_PAIRP($input)) {
 567                // check the first element only
 568                K* k;
 569                Scheme_Object* head = scheme_car($input);
 570                if (SCHEME_PAIRP(head)) {
 571                    Scheme_Object* key = scheme_car(head);
 572                    Scheme_Object* val = scheme_cdr(head);
 573                    if (SWIG_ConvertPtr(val,(void **) &k,
 574                                    $descriptor(K *), 0) == -1) {
 575                        $1 = 0;
 576                    } else {
 577                        if (CHECK(val)) {
 578                            $1 = 1;
 579                        } else if (SCHEME_PAIRP(val)) {
 580                            val = scheme_car(val);
 581                            if (CHECK(val))
 582                                $1 = 1;
 583                            else
 584                                $1 = 0;
 585                        } else {
 586                            $1 = 0;
 587                        }
 588                    }
 589                } else {
 590                    $1 = 0;
 591                }
 592            } else {
 593                // wrapped map?
 594                std::map<K,T >* m;
 595                if (SWIG_ConvertPtr($input,(void **) &m,
 596                                $&1_descriptor, 0) != -1)
 597                    $1 = 1;
 598                else
 599                    $1 = 0;
 600            }
 601        }
 602        %typecheck(SWIG_TYPECHECK_MAP) const map<K,T>&,
 603                                       const map<K,T>* {
 604            // native sequence?
 605            if (SCHEME_NULLP($input)) {
 606                /* an empty sequence can be of any type */
 607                $1 = 1;
 608            } else if (SCHEME_PAIRP($input)) {
 609                // check the first element only
 610                K* k;
 611                Scheme_Object* head = scheme_car($input);
 612                if (SCHEME_PAIRP(head)) {
 613                    Scheme_Object* key = scheme_car(head);
 614                    Scheme_Object* val = scheme_cdr(head);
 615                    if (SWIG_ConvertPtr(val,(void **) &k,
 616                                    $descriptor(K *), 0) == -1) {
 617                        $1 = 0;
 618                    } else {
 619                        if (CHECK(val)) {
 620                            $1 = 1;
 621                        } else if (SCHEME_PAIRP(val)) {
 622                            val = scheme_car(val);
 623                            if (CHECK(val))
 624                                $1 = 1;
 625                            else
 626                                $1 = 0;
 627                        } else {
 628                            $1 = 0;
 629                        }
 630                    }
 631                } else {
 632                    $1 = 0;
 633                }
 634            } else {
 635                // wrapped map?
 636                std::map<K,T >* m;
 637                if (SWIG_ConvertPtr($input,(void **) &m,
 638                                $1_descriptor, 0) != -1)
 639                    $1 = 1;
 640                else
 641                    $1 = 0;
 642            }
 643        }
 644        %rename("length") size;
 645        %rename("null?") empty;
 646        %rename("clear!") clear;
 647        %rename("ref") __getitem__;
 648        %rename("set!") __setitem__;
 649        %rename("delete!") __delitem__;
 650        %rename("has-key?") has_key;
 651      public:
 652        map();
 653        map(const map<K,T> &);
 654        
 655        unsigned int size() const;
 656        bool empty() const;
 657        void clear();
 658        %extend {
 659            T __getitem__(const K& key) throw (std::out_of_range) {
 660                std::map<K,T >::iterator i = self->find(key);
 661                if (i != self->end())
 662                    return i->second;
 663                else
 664                    throw std::out_of_range("key not found");
 665            }
 666            void __setitem__(const K& key, T x) {
 667                (*self)[key] = x;
 668            }
 669            void __delitem__(const K& key) throw (std::out_of_range) {
 670                std::map<K,T >::iterator i = self->find(key);
 671                if (i != self->end())
 672                    self->erase(i);
 673                else
 674                    throw std::out_of_range("key not found");
 675            }
 676            bool has_key(const K& key) {
 677                std::map<K,T >::iterator i = self->find(key);
 678                return i != self->end();
 679            }
 680            Scheme_Object* keys() {
 681                Scheme_Object* result = scheme_null;
 682                for (std::map<K,T >::reverse_iterator i=self->rbegin(); 
 683                                                      i!=self->rend(); ++i) {
 684                    K* key = new K(i->first);
 685                    Scheme_Object* k = SWIG_NewPointerObj(key,$descriptor(K *), 1);
 686                    result = scheme_make_pair(k,result);
 687                }
 688                return result;
 689            }
 690        }
 691    };
 692    %enddef
 693
 694    %define specialize_std_map_on_both(K,CHECK_K,CONVERT_K_FROM,CONVERT_K_TO,
 695                                       T,CHECK_T,CONVERT_T_FROM,CONVERT_T_TO)
 696    template<> class map<K,T> {
 697        %typemap(in) map<K,T> (std::map<K,T>* m) {
 698            if (SCHEME_NULLP($input)) {
 699                $1 = std::map<K,T >();
 700            } else if (SCHEME_PAIRP($input)) {
 701                $1 = std::map<K,T >();
 702                Scheme_Object* alist = $input;
 703                while (!SCHEME_NULLP(alist)) {
 704                    Scheme_Object *entry, *key, *val;
 705                    entry = scheme_car(alist);
 706                    if (!SCHEME_PAIRP(entry))
 707                        SWIG_exception(SWIG_TypeError,"alist expected");
 708                    key = scheme_car(entry);
 709                    val = scheme_cdr(entry);
 710                    if (!CHECK_K(key))
 711                        SWIG_exception(SWIG_TypeError,
 712                                           "map<" #K "," #T "> expected");
 713                    if (!CHECK_T(val)) {
 714                        if (!SCHEME_PAIRP(val))
 715                            SWIG_exception(SWIG_TypeError,"alist expected");
 716                        val = scheme_car(val);
 717                        if (!CHECK_T(val))
 718                            SWIG_exception(SWIG_TypeError,
 719                                           "map<" #K "," #T "> expected");
 720                    }
 721                    (($1_type &)$1)[CONVERT_K_FROM(key)] = 
 722                                               CONVERT_T_FROM(val);
 723                    alist = scheme_cdr(alist);
 724                }
 725            } else {
 726                $1 = *(($&1_type)
 727                       SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0));
 728            }
 729        }
 730        %typemap(in) const map<K,T>& (std::map<K,T> temp,
 731                                      std::map<K,T>* m),
 732                     const map<K,T>* (std::map<K,T> temp,
 733                                      std::map<K,T>* m) {
 734            if (SCHEME_NULLP($input)) {
 735                temp = std::map<K,T >();
 736                $1 = &temp;
 737            } else if (SCHEME_PAIRP($input)) {
 738                temp = std::map<K,T >();
 739                $1 = &temp;
 740                Scheme_Object* alist = $input;
 741                while (!SCHEME_NULLP(alist)) {
 742                    Scheme_Object *entry, *key, *val;
 743                    entry = scheme_car(alist);
 744                    if (!SCHEME_PAIRP(entry))
 745                        SWIG_exception(SWIG_TypeError,"alist expected");
 746                    key = scheme_car(entry);
 747                    val = scheme_cdr(entry);
 748                    if (!CHECK_K(key))
 749                        SWIG_exception(SWIG_TypeError,
 750                                           "map<" #K "," #T "> expected");
 751                    if (!CHECK_T(val)) {
 752                        if (!SCHEME_PAIRP(val))
 753                            SWIG_exception(SWIG_TypeError,"alist expected");
 754                        val = scheme_car(val);
 755                        if (!CHECK_T(val))
 756                            SWIG_exception(SWIG_TypeError,
 757                                           "map<" #K "," #T "> expected");
 758                    }
 759                    temp[CONVERT_K_FROM(key)] = CONVERT_T_FROM(val);
 760                    alist = scheme_cdr(alist);
 761                }
 762            } else {
 763                $1 = ($1_ltype) SWIG_MustGetPtr($input,$1_descriptor,$argnum, 0);
 764            }
 765        }
 766        %typemap(out) map<K,T> {
 767            Scheme_Object* alist = scheme_null;
 768            for (std::map<K,T >::reverse_iterator i=$1.rbegin(); 
 769                                                  i!=$1.rend(); ++i) {
 770                Scheme_Object* k = CONVERT_K_TO(i->first);
 771                Scheme_Object* x = CONVERT_T_TO(i->second);
 772                Scheme_Object* entry = scheme_make_pair(k,x);
 773                alist = scheme_make_pair(entry,alist);
 774            }
 775            $result = alist;
 776        }
 777        %typecheck(SWIG_TYPECHECK_MAP) map<K,T> {
 778            // native sequence?
 779            if (SCHEME_NULLP($input)) {
 780                /* an empty sequence can be of any type */
 781                $1 = 1;
 782            } else if (SCHEME_PAIRP($input)) {
 783                // check the first element only
 784                Scheme_Object* head = scheme_car($input);
 785                if (SCHEME_PAIRP(head)) {
 786                    Scheme_Object* key = scheme_car(head);
 787                    Scheme_Object* val = scheme_cdr(head);
 788                    if (!CHECK_K(key)) {
 789                        $1 = 0;
 790                    } else {
 791                        if (CHECK_T(val)) {
 792                            $1 = 1;
 793                        } else if (SCHEME_PAIRP(val)) {
 794                            val = scheme_car(val);
 795                            if (CHECK_T(val))
 796                                $1 = 1;
 797                            else
 798                                $1 = 0;
 799                        } else {
 800                            $1 = 0;
 801                        }
 802                    }
 803                } else {
 804                    $1 = 0;
 805                }
 806            } else {
 807                // wrapped map?
 808                std::map<K,T >* m;
 809                if (SWIG_ConvertPtr($input,(void **) &m,
 810                                $&1_descriptor, 0) != -1)
 811                    $1 = 1;
 812                else
 813                    $1 = 0;
 814            }
 815        }
 816        %typecheck(SWIG_TYPECHECK_MAP) const map<K,T>&,
 817                                       const map<K,T>* {
 818            // native sequence?
 819            if (SCHEME_NULLP($input)) {
 820                /* an empty sequence can be of any type */
 821                $1 = 1;
 822            } else if (SCHEME_PAIRP($input)) {
 823                // check the first element only
 824                Scheme_Object* head = scheme_car($input);
 825                if (SCHEME_PAIRP(head)) {
 826                    Scheme_Object* key = scheme_car(head);
 827                    Scheme_Object* val = scheme_cdr(head);
 828                    if (!CHECK_K(key)) {
 829                        $1 = 0;
 830                    } else {
 831                        if (CHECK_T(val)) {
 832                            $1 = 1;
 833                        } else if (SCHEME_PAIRP(val)) {
 834                            val = scheme_car(val);
 835                            if (CHECK_T(val))
 836                                $1 = 1;
 837                            else
 838                                $1 = 0;
 839                        } else {
 840                            $1 = 0;
 841                        }
 842                    }
 843                } else {
 844                    $1 = 0;
 845                }
 846            } else {
 847                // wrapped map?
 848                std::map<K,T >* m;
 849                if (SWIG_ConvertPtr($input,(void **) &m,
 850                                $1_descriptor, 0) != -1)
 851                    $1 = 1;
 852                else
 853                    $1 = 0;
 854            }
 855        }
 856        %rename("length") size;
 857        %rename("null?") empty;
 858        %rename("clear!") clear;
 859        %rename("ref") __getitem__;
 860        %rename("set!") __setitem__;
 861        %rename("delete!") __delitem__;
 862        %rename("has-key?") has_key;
 863      public:
 864        map();
 865        map(const map<K,T> &);
 866        
 867        unsigned int size() const;
 868        bool empty() const;
 869        void clear();
 870        %extend {
 871            T __getitem__(K key) throw (std::out_of_range) {
 872                std::map<K,T >::iterator i = self->find(key);
 873                if (i != self->end())
 874                    return i->second;
 875                else
 876                    throw std::out_of_range("key not found");
 877            }
 878            void __setitem__(K key, T x) {
 879                (*self)[key] = x;
 880            }
 881            void __delitem__(K key) throw (std::out_of_range) {
 882                std::map<K,T >::iterator i = self->find(key);
 883                if (i != self->end())
 884                    self->erase(i);
 885                else
 886                    throw std::out_of_range("key not found");
 887            }
 888            bool has_key(K key) {
 889                std::map<K,T >::iterator i = self->find(key);
 890                return i != self->end();
 891            }
 892            Scheme_Object* keys() {
 893                Scheme_Object* result = scheme_null;
 894                for (std::map<K,T >::reverse_iterator i=self->rbegin(); 
 895                                                      i!=self->rend(); ++i) {
 896                    Scheme_Object* k = CONVERT_K_TO(i->first);
 897                    result = scheme_make_pair(k,result);
 898                }
 899                return result;
 900            }
 901        }
 902    };
 903    %enddef
 904
 905
 906    specialize_std_map_on_key(bool,SCHEME_BOOLP,
 907                              SCHEME_TRUEP,swig_make_boolean);
 908    specialize_std_map_on_key(int,SCHEME_INTP,
 909                              SCHEME_INT_VAL,scheme_make_integer_value);
 910    specialize_std_map_on_key(short,SCHEME_INTP,
 911                              SCHEME_INT_VAL,scheme_make_integer_value);
 912    specialize_std_map_on_key(long,SCHEME_INTP,
 913                              SCHEME_INT_VAL,scheme_make_integer_value);
 914    specialize_std_map_on_key(unsigned int,SCHEME_INTP,
 915                              SCHEME_INT_VAL,scheme_make_integer_value);
 916    specialize_std_map_on_key(unsigned short,SCHEME_INTP,
 917                              SCHEME_INT_VAL,scheme_make_integer_value);
 918    specialize_std_map_on_key(unsigned long,SCHEME_INTP,
 919                              SCHEME_INT_VAL,scheme_make_integer_value);
 920    specialize_std_map_on_key(double,SCHEME_REALP,
 921                              scheme_real_to_double,scheme_make_double);
 922    specialize_std_map_on_key(float,SCHEME_REALP,
 923                              scheme_real_to_double,scheme_make_double);
 924    specialize_std_map_on_key(std::string,SCHEME_STRINGP,
 925                              swig_scm_to_string,swig_make_string);
 926
 927    specialize_std_map_on_value(bool,SCHEME_BOOLP,
 928                                SCHEME_TRUEP,swig_make_boolean);
 929    specialize_std_map_on_value(int,SCHEME_INTP,
 930                                SCHEME_INT_VAL,scheme_make_integer_value);
 931    specialize_std_map_on_value(short,SCHEME_INTP,
 932                                SCHEME_INT_VAL,scheme_make_integer_value);
 933    specialize_std_map_on_value(long,SCHEME_INTP,
 934                                SCHEME_INT_VAL,scheme_make_integer_value);
 935    specialize_std_map_on_value(unsigned int,SCHEME_INTP,
 936                                SCHEME_INT_VAL,scheme_make_integer_value);
 937    specialize_std_map_on_value(unsigned short,SCHEME_INTP,
 938                                SCHEME_INT_VAL,scheme_make_integer_value);
 939    specialize_std_map_on_value(unsigned long,SCHEME_INTP,
 940                                SCHEME_INT_VAL,scheme_make_integer_value);
 941    specialize_std_map_on_value(double,SCHEME_REALP,
 942                                scheme_real_to_double,scheme_make_double);
 943    specialize_std_map_on_value(float,SCHEME_REALP,
 944                                scheme_real_to_double,scheme_make_double);
 945    specialize_std_map_on_value(std::string,SCHEME_STRINGP,
 946                                swig_scm_to_string,swig_make_string);
 947
 948    specialize_std_map_on_both(bool,SCHEME_BOOLP,
 949                               SCHEME_TRUEP,swig_make_boolean,
 950                               bool,SCHEME_BOOLP,
 951                               SCHEME_TRUEP,swig_make_boolean);
 952    specialize_std_map_on_both(bool,SCHEME_BOOLP,
 953                               SCHEME_TRUEP,swig_make_boolean,
 954                               int,SCHEME_INTP,
 955                               SCHEME_INT_VAL,scheme_make_integer_value);
 956    specialize_std_map_on_both(bool,SCHEME_BOOLP,
 957                               SCHEME_TRUEP,swig_make_boolean,
 958                               short,SCHEME_INTP,
 959                               SCHEME_INT_VAL,scheme_make_integer_value);
 960    specialize_std_map_on_both(bool,SCHEME_BOOLP,
 961                               SCHEME_TRUEP,swig_make_boolean,
 962                               long,SCHEME_INTP,
 963                               SCHEME_INT_VAL,scheme_make_integer_value);
 964    specialize_std_map_on_both(bool,SCHEME_BOOLP,
 965                               SCHEME_TRUEP,swig_make_boolean,
 966                               unsigned int,SCHEME_INTP,
 967                               SCHEME_INT_VAL,scheme_make_integer_value);
 968    specialize_std_map_on_both(bool,SCHEME_BOOLP,
 969                               SCHEME_TRUEP,swig_make_boolean,
 970                               unsigned short,SCHEME_INTP,
 971                               SCHEME_INT_VAL,scheme_make_integer_value);
 972    specialize_std_map_on_both(bool,SCHEME_BOOLP,
 973                               SCHEME_TRUEP,swig_make_boolean,
 974                               unsigned long,SCHEME_INTP,
 975                               SCHEME_INT_VAL,scheme_make_integer_value);
 976    specialize_std_map_on_both(bool,SCHEME_BOOLP,
 977                               SCHEME_TRUEP,swig_make_boolean,
 978                               double,SCHEME_REALP,
 979                               scheme_real_to_double,scheme_make_double);
 980    specialize_std_map_on_both(bool,SCHEME_BOOLP,
 981                               SCHEME_TRUEP,swig_make_boolean,
 982                               float,SCHEME_REALP,
 983                               scheme_real_to_double,scheme_make_double);
 984    specialize_std_map_on_both(bool,SCHEME_BOOLP,
 985                               SCHEME_TRUEP,swig_make_boolean,
 986                               std::string,SCHEME_STRINGP,
 987                               swig_scm_to_string,swig_make_string);
 988    specialize_std_map_on_both(int,SCHEME_INTP,
 989                               SCHEME_INT_VAL,scheme_make_integer_value,
 990                               bool,SCHEME_BOOLP,
 991                               SCHEME_TRUEP,swig_make_boolean);
 992    specialize_std_map_on_both(int,SCHEME_INTP,
 993                               SCHEME_INT_VAL,scheme_make_integer_value,
 994                               int,SCHEME_INTP,
 995                               SCHEME_INT_VAL,scheme_make_integer_value);
 996    specialize_std_map_on_both(int,SCHEME_INTP,
 997                               SCHEME_INT_VAL,scheme_make_integer_value,
 998                               short,SCHEME_INTP,
 999                               SCHEME_INT_VAL,scheme_make_integer_value);
1000    specialize_std_map_on_both(int,SCHEME_INTP,
1001                               SCHEME_INT_VAL,scheme_make_integer_value,
1002                               long,SCHEME_INTP,
1003                               SCHEME_INT_VAL,scheme_make_integer_value);
1004    specialize_std_map_on_both(int,SCHEME_INTP,
1005                               SCHEME_INT_VAL,scheme_make_integer_value,
1006                               unsigned int,SCHEME_INTP,
1007                               SCHEME_INT_VAL,scheme_make_integer_value);
1008    specialize_std_map_on_both(int,SCHEME_INTP,
1009                               SCHEME_INT_VAL,scheme_make_integer_value,
1010                               unsigned short,SCHEME_INTP,
1011                               SCHEME_INT_VAL,scheme_make_integer_value);
1012    specialize_std_map_on_both(int,SCHEME_INTP,
1013                               SCHEME_INT_VAL,scheme_make_integer_value,
1014                               unsigned long,SCHEME_INTP,
1015                               SCHEME_INT_VAL,scheme_make_integer_value);
1016    specialize_std_map_on_both(int,SCHEME_INTP,
1017                               SCHEME_INT_VAL,scheme_make_integer_value,
1018                               double,SCHEME_REALP,
1019                               scheme_real_to_double,scheme_make_double);
1020    specialize_std_map_on_both(int,SCHEME_INTP,
1021                               SCHEME_INT_VAL,scheme_make_integer_value,
1022                               float,SCHEME_REALP,
1023                               scheme_real_to_double,scheme_make_double);
1024    specialize_std_map_on_both(int,SCHEME_INTP,
1025                               SCHEME_INT_VAL,scheme_make_integer_value,
1026                               std::string,SCHEME_STRINGP,
1027                               swig_scm_to_string,swig_make_string);
1028    specialize_std_map_on_both(short,SCHEME_INTP,
1029                               SCHEME_INT_VAL,scheme_make_integer_value,
1030                               bool,SCHEME_BOOLP,
1031                               SCHEME_TRUEP,swig_make_boolean);
1032    specialize_std_map_on_both(short,SCHEME_INTP,
1033                               SCHEME_INT_VAL,scheme_make_integer_value,
1034                               int,SCHEME_INTP,
1035                               SCHEME_INT_VAL,scheme_make_integer_value);
1036    specialize_std_map_on_both(short,SCHEME_INTP,
1037                               SCHEME_INT_VAL,scheme_make_integer_value,
1038                               short,SCHEME_INTP,
1039                               SCHEME_INT_VAL,scheme_make_integer_value);
1040    specialize_std_map_on_both(short,SCHEME_INTP,
1041                               SCHEME_INT_VAL,scheme_make_integer_value,
1042                               long,SCHEME_INTP,
1043                               SCHEME_INT_VAL,scheme_make_integer_value);
1044    specialize_std_map_on_both(short,SCHEME_INTP,
1045                               SCHEME_INT_VAL,scheme_make_integer_value,
1046                               unsigned int,SCHEME_INTP,
1047                               SCHEME_INT_VAL,scheme_make_integer_value);
1048    specialize_std_map_on_both(short,SCHEME_INTP,
1049                               SCHEME_INT_VAL,scheme_make_integer_value,
1050                               unsigned short,SCHEME_INTP,
1051                               SCHEME_INT_VAL,scheme_make_integer_value);
1052    specialize_std_map_on_both(short,SCHEME_INTP,
1053                               SCHEME_INT_VAL,scheme_make_integer_value,
1054                               unsigned long,SCHEME_INTP,
1055                               SCHEME_INT_VAL,scheme_make_integer_value);
1056    specialize_std_map_on_both(short,SCHEME_INTP,
1057                               SCHEME_INT_VAL,scheme_make_integer_value,
1058                               double,SCHEME_REALP,
1059                               scheme_real_to_double,scheme_make_double);
1060    specialize_std_map_on_both(short,SCHEME_INTP,
1061                               SCHEME_INT_VAL,scheme_make_integer_value,
1062                               float,SCHEME_REALP,
1063                               scheme_real_to_double,scheme_make_double);
1064    specialize_std_map_on_both(short,SCHEME_INTP,
1065                               SCHEME_INT_VAL,scheme_make_integer_value,
1066                               std::string,SCHEME_STRINGP,
1067                               swig_scm_to_string,swig_make_string);
1068    specialize_std_map_on_both(long,SCHEME_INTP,
1069                               SCHEME_INT_VAL,scheme_make_integer_value,
1070                               bool,SCHEME_BOOLP,
1071                               SCHEME_TRUEP,swig_make_boolean);
1072    specialize_std_map_on_both(long,SCHEME_INTP,
1073                               SCHEME_INT_VAL,scheme_make_integer_value,
1074                               int,SCHEME_INTP,
1075                               SCHEME_INT_VAL,scheme_make_integer_value);
1076    specialize_std_map_on_both(long,SCHEME_INTP,
1077                               SCHEME_INT_VAL,scheme_make_integer_value,
1078                               short,SCHEME_INTP,
1079                               SCHEME_INT_VAL,scheme_make_integer_value);
1080    specialize_std_map_on_both(long,SCHEME_INTP,
1081                               SCHEME_INT_VAL,scheme_make_integer_value,
1082                               long,SCHEME_INTP,
1083                               SCHEME_INT_VAL,scheme_make_integer_value);
1084    specialize_std_map_on_both(long,SCHEME_INTP,
1085                               SCHEME_INT_VAL,scheme_make_integer_value,
1086                               unsigned int,SCHEME_INTP,
1087                               SCHEME_INT_VAL,scheme_make_integer_value);
1088    specialize_std_map_on_both(long,SCHEME_INTP,
1089                               SCHEME_INT_VAL,scheme_make_integer_value,
1090                               unsigned short,SCHEME_INTP,
1091                               SCHEME_INT_VAL,scheme_make_integer_value);
1092    specialize_std_map_on_both(long,SCHEME_INTP,
1093                               SCHEME_INT_VAL,scheme_make_integer_value,
1094                               unsigned long,SCHEME_INTP,
1095                               SCHEME_INT_VAL,scheme_make_integer_value);
1096    specialize_std_map_on_both(long,SCHEME_INTP,
1097                               SCHEME_INT_VAL,scheme_make_integer_value,
1098                               double,SCHEME_REALP,
1099                               scheme_real_to_double,scheme_make_double);
1100    specialize_std_map_on_both(long,SCHEME_INTP,
1101                               SCHEME_INT_VAL,scheme_make_integer_value,
1102                               float,SCHEME_REALP,
1103                               scheme_real_to_double,scheme_make_double);
1104    specialize_std_map_on_both(long,SCHEME_INTP,
1105                               SCHEME_INT_VAL,scheme_make_integer_value,
1106                               std::string,SCHEME_STRINGP,
1107                               swig_scm_to_string,swig_make_string);
1108    specialize_std_map_on_both(unsigned int,SCHEME_INTP,
1109                               SCHEME_INT_VAL,scheme_make_integer_value,
1110                               bool,SCHEME_BOOLP,
1111                               SCHEME_TRUEP,swig_make_boolean);
1112    specialize_std_map_on_both(unsigned int,SCHEME_INTP,
1113                               SCHEME_INT_VAL,scheme_make_integer_value,
1114                               int,SCHEME_INTP,
1115                               SCHEME_INT_VAL,scheme_make_integer_value);
1116    specialize_std_map_on_both(unsigned int,SCHEME_INTP,
1117                               SCHEME_INT_VAL,scheme_make_integer_value,
1118                               short,SCHEME_INTP,
1119                               SCHEME_INT_VAL,scheme_make_integeā€¦

Large files files are truncated, but you can click here to view the full file