[Python-checkins] r54064 - sandbox/trunk/pep3101/pep3101.c sandbox/trunk/pep3101/unicodeformat.c

patrick.maupin python-checkins at python.org
Thu Mar 1 19:10:15 CET 2007


Author: patrick.maupin
Date: Thu Mar  1 19:10:12 2007
New Revision: 54064

Modified:
   sandbox/trunk/pep3101/pep3101.c
   sandbox/trunk/pep3101/unicodeformat.c
Log:
Fixed bugs introduced when my import was picking up old .so file

Modified: sandbox/trunk/pep3101/pep3101.c
==============================================================================
--- sandbox/trunk/pep3101/pep3101.c	(original)
+++ sandbox/trunk/pep3101/pep3101.c	Thu Mar  1 19:10:12 2007
@@ -25,7 +25,7 @@
     }
     if (PyUnicode_Check(myobj))
         return table[0](self, args, keywords);
-    else if (PyString_Check(self))
+    else if (PyString_Check(myobj))
         return table[1](self, args, keywords);
     else {
         PyErr_SetString(PyExc_TypeError,

Modified: sandbox/trunk/pep3101/unicodeformat.c
==============================================================================
--- sandbox/trunk/pep3101/unicodeformat.c	(original)
+++ sandbox/trunk/pep3101/unicodeformat.c	Thu Mar  1 19:10:12 2007
@@ -467,8 +467,10 @@
             isnumeric = (CH_TYPE_ISDECIMAL(*fs->fmtstr.ptr));
             if (isnumeric) {
                 get_integer_index(fs, &index);
-                if (isargument)
+                if (isargument) {
                     fs->positional_arg_set &= ~(1 << index);
+                    index += fs->arg_param_offset;
+                }
             }
 
             if (isnumeric && PySequence_Check(myobj))


More information about the Python-checkins mailing list