Author: leo
Date: Thu Aug  4 00:26:49 2005
New Revision: 8801

Modified:
   trunk/dynclasses/pytuple.pmc
Log:
fix PyTuple invalid read

Modified: trunk/dynclasses/pytuple.pmc
==============================================================================
--- trunk/dynclasses/pytuple.pmc        (original)
+++ trunk/dynclasses/pytuple.pmc        Thu Aug  4 00:26:49 2005
@@ -155,12 +155,12 @@ Return a new iterator for SELF.
 */
 
     PMC* get_iter () {
-        PMC *iter = pmc_new_init(INTERP, enum_class_Iterator, SELF);
+        PMC *iter = pmc_new_init(INTERP, PyBuiltin_PyIter, SELF);
         PMC *key =  pmc_new(INTERP, enum_class_Key);
         PMC_struct_val(iter) = key;
         PObj_get_FLAGS(key) |= KEY_integer_FLAG;
         PMC_int_val(key) = 0;
-        if (!((List *) PMC_data(SELF))->length)
+        if (!SELF.elements())
             PMC_int_val(key) = -1;
         return iter;
     }

Reply via email to