Author: coke
Date: Wed Jul 23 20:43:50 2008
New Revision: 29719

Modified:
   trunk/languages/tcl/src/pmc/tcldict.pmc

Log:
[tcl] reclaim another 122 spec tests from dict.test
Avoiding the original segfault is nice, but actually having a sane
VTABLE_get_string avoids another crash and gets us further through
the test file.


Modified: trunk/languages/tcl/src/pmc/tcldict.pmc
==============================================================================
--- trunk/languages/tcl/src/pmc/tcldict.pmc     (original)
+++ trunk/languages/tcl/src/pmc/tcldict.pmc     Wed Jul 23 20:43:50 2008
@@ -34,24 +34,24 @@
 
 =item C<STRING *get_string()>
 
-Returns the dict as a string. Take advantage of the heavy lifting already 
present
-in TclList.
+Returns the dict as a string. Take advantage of the heavy lifting already
+present in TclList.
 
 =cut
 
 */
 
     VTABLE STRING* get_string() {
-        PMC *list, *iterator;
+        PMC *list, *iterator, *value;
         STRING *key;
-        PMC *value;
+
         list = pmc_new(INTERP, pmc_type(INTERP, CONST_STRING(INTERP, 
"TclList")));
-        iterator = VTABLE_get_iter(INTERP, list);
+        iterator = SELF.get_iter();
 
         while (VTABLE_get_bool(INTERP, iterator)) {
                 key = VTABLE_shift_string(INTERP, iterator);
                 VTABLE_push_string(INTERP, list, key);
-                value = VTABLE_get_pmc_keyed_str(INTERP, list, key);
+                value = VTABLE_get_pmc_keyed_str(INTERP, SELF, key);
                 VTABLE_push_string(INTERP, list, VTABLE_get_string(INTERP, 
value));
         }
         return VTABLE_get_string(INTERP, list);

Reply via email to