Yay, progress :)

On 4/23/06, guido.van.rossum <[email protected]> wrote:
Here is a bytes type.  It's very minimal but it's a start.

It's a bit leaky, and I noticed a teensy buglet. Are you still working on it, or should I just check in fixes?

+    /* Get the iterator */
+    it = PyObject_GetIter(arg);
+    if (it == NULL)
+       return 0;

Shouldn't this return -1?
 

+    /* Run the iterator to exhaustion */
+    for (;;) {
+       PyObject *item;
+       Py_ssize_t value;
+
+       /* Get the next item */
+       item = iternext(it);

You never DECREF the item the iterator gives you.

(There was also a typo in the testsuite that only showed when running under regrtest, I checked that in already.)

--
Thomas Wouters <[EMAIL PROTECTED]>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to