<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[136957] branches/gsoc15-portfile-generator</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/136957">136957</a></dd>
<dt>Author</dt> <dd>chunyang@macports.org</dd>
<dt>Date</dt> <dd>2015-05-31 08:03:29 -0700 (Sun, 31 May 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Sync the gsoc15-portfile-generator branch with trunk/base through <a href="https://trac.macports.org/changeset/136956">r136956</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchesgsoc15portfilegeneratorsrcmachista10machistai">branches/gsoc15-portfile-generator/src/machista1.0/machista.i</a></li>
<li><a href="#branchesgsoc15portfilegeneratorsrcmachista10machista_wrapc">branches/gsoc15-portfile-generator/src/machista1.0/machista_wrap.c</a></li>
</ul>

<h3>Property Changed</h3>
<ul>
<li><a href="#branchesgsoc15portfilegenerator">branches/gsoc15-portfile-generator/</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchesgsoc15portfilegenerator"></a>
<div class="propset"><h4>Property changes: branches/gsoc15-portfile-generator</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="modfile"><h4>Modified: svn:mergeinfo</h4></div>
<span class="cx">/branches/gsoc09-logging/base:51231-60371
</span><span class="cx">/branches/gsoc11-rev-upgrade/base:78828-88375
</span><span class="cx">/branches/gsoc11-statistics/base:79520,79666
</span><span class="cx">/branches/gsoc13-tests:106692-111324
</span><span class="cx">/branches/gsoc14-cleanup:123738-124046
</span><span class="cx">/branches/gsoc14-interactive/base:119516-124240
</span><span class="cx">/branches/universal-sanity/base:51872-52323
</span><span class="cx">/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
</span><span class="cx">/users/perry/base-bugs_and_notes:45682-46060
</span><span class="cx">/users/perry/base-select:44044-44692
</span><span class="cx">   + /branches/gsoc08-privileges/base:37343-46937
</span><span class="cx">/branches/gsoc09-logging/base:51231-60371
</span><span class="cx">/branches/gsoc11-rev-upgrade/base:78828-88375
</span><span class="cx">/branches/gsoc11-statistics/base:79520,79666
</span><span class="cx">/branches/gsoc13-tests:106692-111324
</span><span class="cx">/branches/gsoc14-cleanup:123738-124046
</span><span class="cx">/branches/gsoc14-interactive/base:119516-124240
</span><span class="cx">/branches/universal-sanity/base:51872-52323
</span><span class="cx">/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
</span><span class="cx">/trunk/base:136799-136956
</span><span class="cx">/users/perry/base-bugs_and_notes:45682-46060
</span><span class="cx">/users/perry/base-select:44044-44692
</span><a id="branchesgsoc15portfilegeneratorsrcmachista10machistai"></a>
<div class="modfile"><h4>Modified: branches/gsoc15-portfile-generator/src/machista1.0/machista.i (136956 => 136957)</h4>
<pre class="diff"><span>
<span class="info">--- branches/gsoc15-portfile-generator/src/machista1.0/machista.i        2015-05-31 13:40:27 UTC (rev 136956)
+++ branches/gsoc15-portfile-generator/src/machista1.0/machista.i        2015-05-31 15:03:29 UTC (rev 136957)
</span><span class="lines">@@ -2,7 +2,8 @@
</span><span class="cx"> %module machista
</span><span class="cx"> 
</span><span class="cx"> %{
</span><del>-    #include &quot;libmachista.h&quot;
</del><ins>+#include &lt;tcl.h&gt;
+#include &quot;libmachista.h&quot;
</ins><span class="cx"> %}
</span><span class="cx"> 
</span><span class="cx"> %inline %{
</span></span></pre></div>
<a id="branchesgsoc15portfilegeneratorsrcmachista10machista_wrapc"></a>
<div class="modfile"><h4>Modified: branches/gsoc15-portfile-generator/src/machista1.0/machista_wrap.c (136956 => 136957)</h4>
<pre class="diff"><span>
<span class="info">--- branches/gsoc15-portfile-generator/src/machista1.0/machista_wrap.c        2015-05-31 13:40:27 UTC (rev 136956)
+++ branches/gsoc15-portfile-generator/src/machista1.0/machista_wrap.c        2015-05-31 15:03:29 UTC (rev 136957)
</span><span class="lines">@@ -1,11 +1,11 @@
</span><span class="cx"> /* ----------------------------------------------------------------------------
</span><span class="cx">  * This file was automatically generated by SWIG (http://www.swig.org).
</span><del>- * Version 1.3.40
- * 
- * This file is not intended to be easily readable and contains a number of 
</del><ins>+ * Version 3.0.5
+ *
+ * This file is not intended to be easily readable and contains a number of
</ins><span class="cx">  * coding conventions designed to improve portability and efficiency. Do not make
</span><del>- * changes to this file unless you know what you are doing--modify the SWIG 
- * interface file instead. 
</del><ins>+ * changes to this file unless you know what you are doing--modify the SWIG
+ * interface file instead.
</ins><span class="cx">  * ----------------------------------------------------------------------------- */
</span><span class="cx"> 
</span><span class="cx"> #define SWIGTCL
</span><span class="lines">@@ -41,28 +41,28 @@
</span><span class="cx"> #ifndef SWIGUNUSED
</span><span class="cx"> # if defined(__GNUC__)
</span><span class="cx"> #   if !(defined(__cplusplus)) || (__GNUC__ &gt; 3 || (__GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ &gt;= 4))
</span><del>-#     define SWIGUNUSED __attribute__ ((__unused__)) 
</del><ins>+#     define SWIGUNUSED __attribute__ ((__unused__))
</ins><span class="cx"> #   else
</span><span class="cx"> #     define SWIGUNUSED
</span><span class="cx"> #   endif
</span><span class="cx"> # elif defined(__ICC)
</span><del>-#   define SWIGUNUSED __attribute__ ((__unused__)) 
</del><ins>+#   define SWIGUNUSED __attribute__ ((__unused__))
</ins><span class="cx"> # else
</span><del>-#   define SWIGUNUSED 
</del><ins>+#   define SWIGUNUSED
</ins><span class="cx"> # endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #ifndef SWIG_MSC_UNSUPPRESS_4505
</span><span class="cx"> # if defined(_MSC_VER)
</span><span class="cx"> #   pragma warning(disable : 4505) /* unreferenced local function has been removed */
</span><del>-# endif 
</del><ins>+# endif
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #ifndef SWIGUNUSEDPARM
</span><span class="cx"> # ifdef __cplusplus
</span><span class="cx"> #   define SWIGUNUSEDPARM(p)
</span><span class="cx"> # else
</span><del>-#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
</del><ins>+#   define SWIGUNUSEDPARM(p) p SWIGUNUSED
</ins><span class="cx"> # endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx"> #   define SWIGSTDCALL __stdcall
</span><span class="cx"> # else
</span><span class="cx"> #   define SWIGSTDCALL
</span><del>-# endif 
</del><ins>+# endif
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
</span><span class="lines">@@ -151,7 +151,7 @@
</span><span class="cx">   You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
</span><span class="cx">   creating a static or dynamic library from the SWIG runtime code.
</span><span class="cx">   In 99.9% of the cases, SWIG just needs to declare them as 'static'.
</span><del>-  
</del><ins>+
</ins><span class="cx">   But only do this if strictly necessary, ie, if you have problems
</span><span class="cx">   with your compiler or suchlike.
</span><span class="cx"> */
</span><span class="lines">@@ -177,16 +177,16 @@
</span><span class="cx"> #define SWIG_POINTER_OWN           0x1
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-/* 
</del><ins>+/*
</ins><span class="cx">    Flags/methods for returning states.
</span><del>-   
-   The SWIG conversion methods, as ConvertPtr, return and integer 
</del><ins>+
+   The SWIG conversion methods, as ConvertPtr, return an integer
</ins><span class="cx">    that tells if the conversion was successful or not. And if not,
</span><span class="cx">    an error code can be returned (see swigerrors.swg for the codes).
</span><del>-   
</del><ins>+
</ins><span class="cx">    Use the following macros/flags to set or process the returning
</span><span class="cx">    states.
</span><del>-   
</del><ins>+
</ins><span class="cx">    In old versions of SWIG, code such as the following was usually written:
</span><span class="cx"> 
</span><span class="cx">      if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
</span><span class="lines">@@ -219,23 +219,23 @@
</span><span class="cx">     } else {
</span><span class="cx">       // fail code
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">    I.e., now SWIG_ConvertPtr can return new objects and you can
</span><span class="cx">    identify the case and take care of the deallocation. Of course that
</span><span class="cx">    also requires SWIG_ConvertPtr to return new result values, such as
</span><span class="cx"> 
</span><del>-      int SWIG_ConvertPtr(obj, ptr,...) {         
-        if (&lt;obj is ok&gt;) {                               
-          if (&lt;need new object&gt;) {                       
-            *ptr = &lt;ptr to new allocated object&gt;; 
-            return SWIG_NEWOBJ;                       
-          } else {                                       
-            *ptr = &lt;ptr to old object&gt;;               
-            return SWIG_OLDOBJ;                       
-          }                                        
-        } else {                                       
-          return SWIG_BADOBJ;                       
-        }                                               
</del><ins>+      int SWIG_ConvertPtr(obj, ptr,...) {
+        if (&lt;obj is ok&gt;) {
+          if (&lt;need new object&gt;) {
+            *ptr = &lt;ptr to new allocated object&gt;;
+            return SWIG_NEWOBJ;
+          } else {
+            *ptr = &lt;ptr to old object&gt;;
+            return SWIG_OLDOBJ;
+          }
+        } else {
+          return SWIG_BADOBJ;
+        }
</ins><span class="cx">       }
</span><span class="cx"> 
</span><span class="cx">    Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
</span><span class="lines">@@ -249,17 +249,17 @@
</span><span class="cx">        int fooi(int);
</span><span class="cx"> 
</span><span class="cx">    and you call
</span><del>- 
</del><ins>+
</ins><span class="cx">       food(1)   // cast rank '1'  (1 -&gt; 1.0)
</span><span class="cx">       fooi(1)   // cast rank '0'
</span><span class="cx"> 
</span><span class="cx">    just use the SWIG_AddCast()/SWIG_CheckState()
</span><span class="cx"> */
</span><span class="cx"> 
</span><del>-#define SWIG_OK                    (0) 
</del><ins>+#define SWIG_OK                    (0)
</ins><span class="cx"> #define SWIG_ERROR                 (-1)
</span><span class="cx"> #define SWIG_IsOK(r)               (r &gt;= 0)
</span><del>-#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
</del><ins>+#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)
</ins><span class="cx"> 
</span><span class="cx"> /* The CastRankLimit says how many bits are used for the cast rank */
</span><span class="cx"> #define SWIG_CASTRANKLIMIT         (1 &lt;&lt; 8)
</span><span class="lines">@@ -290,14 +290,14 @@
</span><span class="cx"> #  endif
</span><span class="cx"> #  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
</span><span class="cx"> #  define SWIG_CastRank(r)           (r &amp; SWIG_CASTRANKMASK)
</span><del>-SWIGINTERNINLINE int SWIG_AddCast(int r) { 
</del><ins>+SWIGINTERNINLINE int SWIG_AddCast(int r) {
</ins><span class="cx">   return SWIG_IsOK(r) ? ((SWIG_CastRank(r) &lt; SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
</span><span class="cx"> }
</span><del>-SWIGINTERNINLINE int SWIG_CheckState(int r) { 
-  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
</del><ins>+SWIGINTERNINLINE int SWIG_CheckState(int r) {
+  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
</ins><span class="cx"> }
</span><span class="cx"> #else /* no cast-rank mode */
</span><del>-#  define SWIG_AddCast
</del><ins>+#  define SWIG_AddCast(r) (r)
</ins><span class="cx"> #  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -341,7 +341,7 @@
</span><span class="cx">   void                    *clientdata;                /* Language specific module data */
</span><span class="cx"> } swig_module_info;
</span><span class="cx"> 
</span><del>-/* 
</del><ins>+/*
</ins><span class="cx">   Compare two type names skipping the space characters, therefore
</span><span class="cx">   &quot;char*&quot; == &quot;char *&quot; and &quot;Class&lt;int&gt;&quot; == &quot;Class&lt;int &gt;&quot;, etc.
</span><span class="cx"> 
</span><span class="lines">@@ -361,18 +361,18 @@
</span><span class="cx"> 
</span><span class="cx"> /*
</span><span class="cx">   Check type equivalence in a name list like &lt;name1&gt;|&lt;name2&gt;|...
</span><del>-  Return 0 if not equal, 1 if equal
</del><ins>+  Return 0 if equal, -1 if nb &lt; tb, 1 if nb &gt; tb
</ins><span class="cx"> */
</span><span class="cx"> SWIGRUNTIME int
</span><del>-SWIG_TypeEquiv(const char *nb, const char *tb) {
-  int equiv = 0;
</del><ins>+SWIG_TypeCmp(const char *nb, const char *tb) {
+  int equiv = 1;
</ins><span class="cx">   const char* te = tb + strlen(tb);
</span><span class="cx">   const char* ne = nb;
</span><del>-  while (!equiv &amp;&amp; *ne) {
</del><ins>+  while (equiv != 0 &amp;&amp; *ne) {
</ins><span class="cx">     for (nb = ne; *ne; ++ne) {
</span><span class="cx">       if (*ne == '|') break;
</span><span class="cx">     }
</span><del>-    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
</del><ins>+    equiv = SWIG_TypeNameComp(nb, ne, tb, te);
</ins><span class="cx">     if (*ne) ++ne;
</span><span class="cx">   }
</span><span class="cx">   return equiv;
</span><span class="lines">@@ -380,24 +380,13 @@
</span><span class="cx"> 
</span><span class="cx"> /*
</span><span class="cx">   Check type equivalence in a name list like &lt;name1&gt;|&lt;name2&gt;|...
</span><del>-  Return 0 if equal, -1 if nb &lt; tb, 1 if nb &gt; tb
</del><ins>+  Return 0 if not equal, 1 if equal
</ins><span class="cx"> */
</span><span class="cx"> SWIGRUNTIME int
</span><del>-SWIG_TypeCompare(const char *nb, const char *tb) {
-  int equiv = 0;
-  const char* te = tb + strlen(tb);
-  const char* ne = nb;
-  while (!equiv &amp;&amp; *ne) {
-    for (nb = ne; *ne; ++ne) {
-      if (*ne == '|') break;
-    }
-    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
-    if (*ne) ++ne;
-  }
-  return equiv;
</del><ins>+SWIG_TypeEquiv(const char *nb, const char *tb) {
+  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> /*
</span><span class="cx">   Check the typename
</span><span class="cx"> */
</span><span class="lines">@@ -425,7 +414,7 @@
</span><span class="cx">   return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-/* 
</del><ins>+/*
</ins><span class="cx">   Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
</span><span class="cx"> */
</span><span class="cx"> SWIGRUNTIME swig_cast_info *
</span><span class="lines">@@ -460,7 +449,7 @@
</span><span class="cx">   return ((!ty) || (!ty-&gt;converter)) ? ptr : (*ty-&gt;converter)(ptr, newmemory);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-/* 
</del><ins>+/*
</ins><span class="cx">    Dynamic pointer casting. Down an inheritance hierarchy
</span><span class="cx"> */
</span><span class="cx"> SWIGRUNTIME swig_type_info *
</span><span class="lines">@@ -504,7 +493,7 @@
</span><span class="cx">     return type-&gt;name;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-/* 
</del><ins>+/*
</ins><span class="cx">    Set the clientdata field for a type
</span><span class="cx"> */
</span><span class="cx"> SWIGRUNTIME void
</span><span class="lines">@@ -512,14 +501,14 @@
</span><span class="cx">   swig_cast_info *cast = ti-&gt;cast;
</span><span class="cx">   /* if (ti-&gt;clientdata == clientdata) return; */
</span><span class="cx">   ti-&gt;clientdata = clientdata;
</span><del>-  
</del><ins>+
</ins><span class="cx">   while (cast) {
</span><span class="cx">     if (!cast-&gt;converter) {
</span><span class="cx">       swig_type_info *tc = cast-&gt;type;
</span><span class="cx">       if (!tc-&gt;clientdata) {
</span><span class="cx">         SWIG_TypeClientData(tc, clientdata);
</span><span class="cx">       }
</span><del>-    }    
</del><ins>+    }
</ins><span class="cx">     cast = cast-&gt;next;
</span><span class="cx">   }
</span><span class="cx"> }
</span><span class="lines">@@ -528,31 +517,31 @@
</span><span class="cx">   SWIG_TypeClientData(ti, clientdata);
</span><span class="cx">   ti-&gt;owndata = 1;
</span><span class="cx"> }
</span><del>-  
</del><ins>+
</ins><span class="cx"> /*
</span><span class="cx">   Search for a swig_type_info structure only by mangled name
</span><span class="cx">   Search is a O(log #types)
</span><del>-  
-  We start searching at module start, and finish searching when start == end.  
</del><ins>+
+  We start searching at module start, and finish searching when start == end.
</ins><span class="cx">   Note: if start == end at the beginning of the function, we go all the way around
</span><span class="cx">   the circular list.
</span><span class="cx"> */
</span><span class="cx"> SWIGRUNTIME swig_type_info *
</span><del>-SWIG_MangledTypeQueryModule(swig_module_info *start, 
-                            swig_module_info *end, 
</del><ins>+SWIG_MangledTypeQueryModule(swig_module_info *start,
+                            swig_module_info *end,
</ins><span class="cx">                             const char *name) {
</span><span class="cx">   swig_module_info *iter = start;
</span><span class="cx">   do {
</span><span class="cx">     if (iter-&gt;size) {
</span><del>-      register size_t l = 0;
-      register size_t r = iter-&gt;size - 1;
</del><ins>+      size_t l = 0;
+      size_t r = iter-&gt;size - 1;
</ins><span class="cx">       do {
</span><span class="cx">         /* since l+r &gt;= 0, we can (&gt;&gt; 1) instead (/ 2) */
</span><del>-        register size_t i = (l + r) &gt;&gt; 1; 
</del><ins>+        size_t i = (l + r) &gt;&gt; 1;
</ins><span class="cx">         const char *iname = iter-&gt;types[i]-&gt;name;
</span><span class="cx">         if (iname) {
</span><del>-          register int compare = strcmp(name, iname);
-          if (compare == 0) {            
</del><ins>+          int compare = strcmp(name, iname);
+          if (compare == 0) {
</ins><span class="cx">             return iter-&gt;types[i];
</span><span class="cx">           } else if (compare &lt; 0) {
</span><span class="cx">             if (i) {
</span><span class="lines">@@ -577,14 +566,14 @@
</span><span class="cx">   Search for a swig_type_info structure for either a mangled name or a human readable name.
</span><span class="cx">   It first searches the mangled names of the types, which is a O(log #types)
</span><span class="cx">   If a type is not found it then searches the human readable names, which is O(#types).
</span><del>-  
-  We start searching at module start, and finish searching when start == end.  
</del><ins>+
+  We start searching at module start, and finish searching when start == end.
</ins><span class="cx">   Note: if start == end at the beginning of the function, we go all the way around
</span><span class="cx">   the circular list.
</span><span class="cx"> */
</span><span class="cx"> SWIGRUNTIME swig_type_info *
</span><del>-SWIG_TypeQueryModule(swig_module_info *start, 
-                     swig_module_info *end, 
</del><ins>+SWIG_TypeQueryModule(swig_module_info *start,
+                     swig_module_info *end,
</ins><span class="cx">                      const char *name) {
</span><span class="cx">   /* STEP 1: Search the name field using binary search */
</span><span class="cx">   swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
</span><span class="lines">@@ -595,7 +584,7 @@
</span><span class="cx">        of the str field (the human readable name) */
</span><span class="cx">     swig_module_info *iter = start;
</span><span class="cx">     do {
</span><del>-      register size_t i = 0;
</del><ins>+      size_t i = 0;
</ins><span class="cx">       for (; i &lt; iter-&gt;size; ++i) {
</span><span class="cx">         if (iter-&gt;types[i]-&gt;str &amp;&amp; (SWIG_TypeEquiv(iter-&gt;types[i]-&gt;str, name)))
</span><span class="cx">           return iter-&gt;types[i];
</span><span class="lines">@@ -603,56 +592,56 @@
</span><span class="cx">       iter = iter-&gt;next;
</span><span class="cx">     } while (iter != end);
</span><span class="cx">   }
</span><del>-  
</del><ins>+
</ins><span class="cx">   /* neither found a match */
</span><span class="cx">   return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-/* 
</del><ins>+/*
</ins><span class="cx">    Pack binary data into a string
</span><span class="cx"> */
</span><span class="cx"> SWIGRUNTIME char *
</span><span class="cx"> SWIG_PackData(char *c, void *ptr, size_t sz) {
</span><span class="cx">   static const char hex[17] = &quot;0123456789abcdef&quot;;
</span><del>-  register const unsigned char *u = (unsigned char *) ptr;
-  register const unsigned char *eu =  u + sz;
</del><ins>+  const unsigned char *u = (unsigned char *) ptr;
+  const unsigned char *eu =  u + sz;
</ins><span class="cx">   for (; u != eu; ++u) {
</span><del>-    register unsigned char uu = *u;
</del><ins>+    unsigned char uu = *u;
</ins><span class="cx">     *(c++) = hex[(uu &amp; 0xf0) &gt;&gt; 4];
</span><span class="cx">     *(c++) = hex[uu &amp; 0xf];
</span><span class="cx">   }
</span><span class="cx">   return c;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-/* 
</del><ins>+/*
</ins><span class="cx">    Unpack binary data from a string
</span><span class="cx"> */
</span><span class="cx"> SWIGRUNTIME const char *
</span><span class="cx"> SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
</span><del>-  register unsigned char *u = (unsigned char *) ptr;
-  register const unsigned char *eu = u + sz;
</del><ins>+  unsigned char *u = (unsigned char *) ptr;
+  const unsigned char *eu = u + sz;
</ins><span class="cx">   for (; u != eu; ++u) {
</span><del>-    register char d = *(c++);
-    register unsigned char uu;
</del><ins>+    char d = *(c++);
+    unsigned char uu;
</ins><span class="cx">     if ((d &gt;= '0') &amp;&amp; (d &lt;= '9'))
</span><span class="cx">       uu = ((d - '0') &lt;&lt; 4);
</span><span class="cx">     else if ((d &gt;= 'a') &amp;&amp; (d &lt;= 'f'))
</span><span class="cx">       uu = ((d - ('a'-10)) &lt;&lt; 4);
</span><del>-    else 
</del><ins>+    else
</ins><span class="cx">       return (char *) 0;
</span><span class="cx">     d = *(c++);
</span><span class="cx">     if ((d &gt;= '0') &amp;&amp; (d &lt;= '9'))
</span><span class="cx">       uu |= (d - '0');
</span><span class="cx">     else if ((d &gt;= 'a') &amp;&amp; (d &lt;= 'f'))
</span><span class="cx">       uu |= (d - ('a'-10));
</span><del>-    else 
</del><ins>+    else
</ins><span class="cx">       return (char *) 0;
</span><span class="cx">     *u = uu;
</span><span class="cx">   }
</span><span class="cx">   return c;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-/* 
</del><ins>+/*
</ins><span class="cx">    Pack 'void *' into a string buffer.
</span><span class="cx"> */
</span><span class="cx"> SWIGRUNTIME char *
</span><span class="lines">@@ -712,18 +701,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> /*  Errors in SWIG */
</span><del>-#define  SWIG_UnknownError               -1 
-#define  SWIG_IOError                   -2 
-#define  SWIG_RuntimeError              -3 
-#define  SWIG_IndexError                -4 
-#define  SWIG_TypeError                 -5 
-#define  SWIG_DivisionByZero            -6 
-#define  SWIG_OverflowError             -7 
-#define  SWIG_SyntaxError               -8 
-#define  SWIG_ValueError                -9 
</del><ins>+#define  SWIG_UnknownError               -1
+#define  SWIG_IOError                   -2
+#define  SWIG_RuntimeError              -3
+#define  SWIG_IndexError                -4
+#define  SWIG_TypeError                 -5
+#define  SWIG_DivisionByZero            -6
+#define  SWIG_OverflowError             -7
+#define  SWIG_SyntaxError               -8
+#define  SWIG_ValueError                -9
</ins><span class="cx"> #define  SWIG_SystemError               -10
</span><span class="cx"> #define  SWIG_AttributeError            -11
</span><del>-#define  SWIG_MemoryError               -12 
</del><ins>+#define  SWIG_MemoryError               -12
</ins><span class="cx"> #define  SWIG_NullReferenceError   -13
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -856,6 +845,7 @@
</span><span class="cx">   struct swig_class **bases;
</span><span class="cx">   const char              **base_names;
</span><span class="cx">   swig_module_info   *module;
</span><ins>+  Tcl_HashTable       hashtable;
</ins><span class="cx"> } swig_class;
</span><span class="cx"> 
</span><span class="cx"> typedef struct swig_instance {
</span><span class="lines">@@ -914,9 +904,6 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> /* -----------------------------------------------------------------------------
</span><del>- * See the LICENSE file for information on copyright, usage and redistribution
- * of SWIG, and the README file for authors - http://www.swig.org/release.html.
- *
</del><span class="cx">  * tclrun.swg
</span><span class="cx">  *
</span><span class="cx">  * This file contains the runtime support for Tcl modules and includes
</span><span class="lines">@@ -989,10 +976,7 @@
</span><span class="cx"> 
</span><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> extern &quot;C&quot; {
</span><del>-#if 0
-} /* cc-mode */
</del><span class="cx"> #endif
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx"> /* Object support */
</span><span class="cx"> 
</span><span class="lines">@@ -1198,7 +1182,7 @@
</span><span class="cx">   /* create a new pointer */
</span><span class="cx">   data = SWIG_PackData(buf, &amp;module, sizeof(swig_type_info **));
</span><span class="cx">   *data = 0;
</span><del>-  Tcl_SetVar(interp, (char *)&quot;swig_runtime_data_type_pointer&quot; SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, buf, 0);
</del><ins>+  Tcl_SetVar(interp, (char *)&quot;swig_runtime_data_type_pointer&quot; SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, buf, TCL_GLOBAL_ONLY);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /* -----------------------------------------------------------------------------*
</span><span class="lines">@@ -1261,6 +1245,7 @@
</span><span class="cx">   cls_stack_bi[cls_stack_top] = -1;
</span><span class="cx">   cls = inst-&gt;classptr;
</span><span class="cx">   while (1) {
</span><ins>+    Tcl_HashEntry* hashentry;
</ins><span class="cx">     bi = cls_stack_bi[cls_stack_top];
</span><span class="cx">     cls = cls_stack[cls_stack_top];
</span><span class="cx">     if (bi != -1) {
</span><span class="lines">@@ -1285,19 +1270,17 @@
</span><span class="cx">     }
</span><span class="cx">     cls_stack_bi[cls_stack_top]++;
</span><span class="cx"> 
</span><del>-    meth = cls-&gt;methods;
-    /* Check for methods */
-    while (meth &amp;&amp; meth-&gt;name) {
-      if (strcmp(meth-&gt;name,method) == 0) {
</del><ins>+    hashentry = Tcl_FindHashEntry(&amp;(cls-&gt;hashtable), method);
+    if (hashentry) {
+        ClientData cd = Tcl_GetHashValue(hashentry);
+        swig_wrapper method_wrapper = (swig_wrapper)cd;
</ins><span class="cx">         oldarg = objv[1];
</span><span class="cx">         objv[1] = inst-&gt;thisptr;
</span><span class="cx">         Tcl_IncrRefCount(inst-&gt;thisptr);
</span><del>-        rcode = (*meth-&gt;method)(clientData,interp,objc,objv);
</del><ins>+        rcode = (method_wrapper)(clientData,interp,objc,objv);
</ins><span class="cx">         objv[1] = oldarg;
</span><span class="cx">         Tcl_DecrRefCount(inst-&gt;thisptr);
</span><span class="cx">         return rcode;
</span><del>-      }
-      meth++;
</del><span class="cx">     }
</span><span class="cx">     /* Check class methods for a match */
</span><span class="cx">     if (strcmp(method,&quot;cget&quot;) == 0) {
</span><span class="lines">@@ -1404,7 +1387,7 @@
</span><span class="cx"> SWIG_Tcl_NewInstanceObj(Tcl_Interp *interp, void *thisvalue, swig_type_info *type, int flags) {
</span><span class="cx">   Tcl_Obj *robj = SWIG_NewPointerObj(thisvalue, type,0);
</span><span class="cx">   /* Check to see if this pointer belongs to a class or not */
</span><del>-  if ((type-&gt;clientdata) &amp;&amp; (interp)) {
</del><ins>+  if (thisvalue &amp;&amp; (type-&gt;clientdata) &amp;&amp; (interp)) {
</ins><span class="cx">     Tcl_CmdInfo    ci;
</span><span class="cx">     char          *name;
</span><span class="cx">     name = Tcl_GetStringFromObj(robj,NULL);
</span><span class="lines">@@ -1603,9 +1586,6 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #ifdef __cplusplus
</span><del>-#if 0
-{ /* cc-mode */
-#endif
</del><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -1641,7 +1621,7 @@
</span><span class="cx"> 
</span><span class="cx"> #define SWIG_version &quot;1.0&quot;
</span><span class="cx"> 
</span><del>-#define SWIGVERSION 0x010340 
</del><ins>+#define SWIGVERSION 0x030005 
</ins><span class="cx"> #define SWIG_VERSION SWIGVERSION
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -1671,7 +1651,8 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-    #include &quot;libmachista.h&quot;
</del><ins>+#include &lt;tcl.h&gt;
+#include &quot;libmachista.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> #ifdef __MACH__
</span><span class="lines">@@ -2401,18 +2382,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> /* -----------------------------------------------------------------------------
</span><span class="cx">  * Type initialization:
</span><del>- * This problem is tough by the requirement that no dynamic 
- * memory is used. Also, since swig_type_info structures store pointers to 
</del><ins>+ * This problem is tough by the requirement that no dynamic
+ * memory is used. Also, since swig_type_info structures store pointers to
</ins><span class="cx">  * swig_cast_info structures and swig_cast_info structures store pointers back
</span><del>- * to swig_type_info structures, we need some lookup code at initialization. 
- * The idea is that swig generates all the structures that are needed. 
- * The runtime then collects these partially filled structures. 
- * The SWIG_InitializeModule function takes these initial arrays out of 
</del><ins>+ * to swig_type_info structures, we need some lookup code at initialization.
+ * The idea is that swig generates all the structures that are needed.
+ * The runtime then collects these partially filled structures.
+ * The SWIG_InitializeModule function takes these initial arrays out of
</ins><span class="cx">  * swig_module, and does all the lookup, filling in the swig_module.types
</span><span class="cx">  * array with the correct data and linking the correct swig_cast_info
</span><span class="cx">  * structures together.
</span><span class="cx">  *
</span><del>- * The generated swig_type_info structures are assigned staticly to an initial 
</del><ins>+ * The generated swig_type_info structures are assigned statically to an initial
</ins><span class="cx">  * array. We just loop through that array, and handle each type individually.
</span><span class="cx">  * First we lookup if this type has been already loaded, and if so, use the
</span><span class="cx">  * loaded structure instead of the generated one. Then we have to fill in the
</span><span class="lines">@@ -2422,17 +2403,17 @@
</span><span class="cx">  * a column is one of the swig_cast_info structures for that type.
</span><span class="cx">  * The cast_initial array is actually an array of arrays, because each row has
</span><span class="cx">  * a variable number of columns. So to actually build the cast linked list,
</span><del>- * we find the array of casts associated with the type, and loop through it 
</del><ins>+ * we find the array of casts associated with the type, and loop through it
</ins><span class="cx">  * adding the casts to the list. The one last trick we need to do is making
</span><span class="cx">  * sure the type pointer in the swig_cast_info struct is correct.
</span><span class="cx">  *
</span><del>- * First off, we lookup the cast-&gt;type name to see if it is already loaded. 
</del><ins>+ * First off, we lookup the cast-&gt;type name to see if it is already loaded.
</ins><span class="cx">  * There are three cases to handle:
</span><span class="cx">  *  1) If the cast-&gt;type has already been loaded AND the type we are adding
</span><span class="cx">  *     casting info to has not been loaded (it is in this module), THEN we
</span><span class="cx">  *     replace the cast-&gt;type pointer with the type pointer that has already
</span><span class="cx">  *     been loaded.
</span><del>- *  2) If BOTH types (the one we are adding casting info to, and the 
</del><ins>+ *  2) If BOTH types (the one we are adding casting info to, and the
</ins><span class="cx">  *     cast-&gt;type) are loaded, THEN the cast info has already been loaded by
</span><span class="cx">  *     the previous module so we just ignore it.
</span><span class="cx">  *  3) Finally, if cast-&gt;type has not already been loaded, then we add that
</span><span class="lines">@@ -2456,7 +2437,7 @@
</span><span class="cx"> SWIG_InitializeModule(void *clientdata) {
</span><span class="cx">   size_t i;
</span><span class="cx">   swig_module_info *module_head, *iter;
</span><del>-  int found, init;
</del><ins>+  int init;
</ins><span class="cx">   
</span><span class="cx">   /* check to see if the circular list has been setup, if not, set it up */
</span><span class="cx">   if (swig_module.next==0) {
</span><span class="lines">@@ -2475,27 +2456,23 @@
</span><span class="cx">     /* This is the first module loaded for this interpreter */
</span><span class="cx">     /* so set the swig module into the interpreter */
</span><span class="cx">     SWIG_SetModule(clientdata, &amp;swig_module);
</span><del>-    module_head = &amp;swig_module;
</del><span class="cx">   } else {
</span><span class="cx">     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
</span><del>-    found=0;
</del><span class="cx">     iter=module_head;
</span><span class="cx">     do {
</span><span class="cx">       if (iter==&amp;swig_module) {
</span><del>-        found=1;
-        break;
</del><ins>+        /* Our module is already in the list, so there's nothing more to do. */
+        return;
</ins><span class="cx">       }
</span><span class="cx">       iter=iter-&gt;next;
</span><span class="cx">     } while (iter!= module_head);
</span><span class="cx">     
</span><del>-    /* if the is found in the list, then all is done and we may leave */
-    if (found) return;
-    /* otherwise we must add out module into the list */
</del><ins>+    /* otherwise we must add our module into the list */
</ins><span class="cx">     swig_module.next = module_head-&gt;next;
</span><span class="cx">     module_head-&gt;next = &amp;swig_module;
</span><span class="cx">   }
</span><span class="cx">   
</span><del>-  /* When multiple interpeters are used, a module could have already been initialized in
</del><ins>+  /* When multiple interpreters are used, a module could have already been initialized in
</ins><span class="cx">        a different interpreter, but not yet have a pointer in this interpreter.
</span><span class="cx">        In this case, we do not want to continue adding types... everything should be
</span><span class="cx">        set up already */
</span><span class="lines">@@ -2647,7 +2624,7 @@
</span><span class="cx">   
</span><span class="cx">   SWIGINTERN void
</span><span class="cx">   SWIG_Tcl_InstallConstants(Tcl_Interp *interp, swig_const_info constants[]) {
</span><del>-    int i;
</del><ins>+    size_t i;
</ins><span class="cx">     Tcl_Obj *obj;
</span><span class="cx">     
</span><span class="cx">     if (!swigconstTableinit) {
</span><span class="lines">@@ -2672,6 +2649,27 @@
</span><span class="cx">     }
</span><span class="cx">   }
</span><span class="cx">   
</span><ins>+  /* Create fast method lookup tables */
+  
+  SWIGINTERN void
+  SWIG_Tcl_InstallMethodLookupTables(void) {
+    size_t i;
+    
+    for (i = 0; i &lt; swig_module.size; ++i) {
+      swig_type_info *type = swig_module.type_initial[i];
+      if (type-&gt;clientdata) {
+        swig_class* klass = (swig_class*) type-&gt;clientdata;
+        swig_method* meth;
+        Tcl_InitHashTable(&amp;(klass-&gt;hashtable), TCL_STRING_KEYS);
+        for (meth = klass-&gt;methods; meth &amp;&amp; meth-&gt;name; ++meth) {
+          int newEntry;
+          Tcl_HashEntry* hashentry = Tcl_CreateHashEntry(&amp;(klass-&gt;hashtable), meth-&gt;name, &amp;newEntry);
+          Tcl_SetHashValue(hashentry, (ClientData)meth-&gt;method);
+        }
+      }
+    }
+  }
+  
</ins><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="lines">@@ -2681,7 +2679,7 @@
</span><span class="cx">  * -----------------------------------------------------------------------------*/
</span><span class="cx"> 
</span><span class="cx"> SWIGEXPORT int SWIG_init(Tcl_Interp *interp) {
</span><del>-  int i;
</del><ins>+  size_t i;
</ins><span class="cx">   if (interp == 0) return TCL_ERROR;
</span><span class="cx"> #ifdef USE_TCL_STUBS
</span><span class="cx">   /* (char*) cast is required to avoid compiler warning/error for Tcl &lt; 8.4. */
</span><span class="lines">@@ -2718,6 +2716,7 @@
</span><span class="cx">   }
</span><span class="cx">   
</span><span class="cx">   SWIG_Tcl_InstallConstants(interp, swig_constants);
</span><ins>+  SWIG_Tcl_InstallMethodLookupTables();
</ins><span class="cx">   
</span><span class="cx">   
</span><span class="cx">   SWIG_Tcl_SetConstantObj(interp, &quot;machista::SUCCESS&quot;, SWIG_From_int((int)((0x00))));
</span></span></pre>
</div>
</div>

</body>
</html>