Author: christian.heimes
Date: Sat Nov  3 16:18:59 2007
New Revision: 58829

Modified:
   python/branches/py3k-pep3137/Modules/_struct.c
   python/branches/py3k-pep3137/Objects/exceptions.c
Log:
Fixed two compile errors with MS C/C++ compiler on Windows.

Modified: python/branches/py3k-pep3137/Modules/_struct.c
==============================================================================
--- python/branches/py3k-pep3137/Modules/_struct.c      (original)
+++ python/branches/py3k-pep3137/Modules/_struct.c      Sat Nov  3 16:18:59 2007
@@ -1587,7 +1587,7 @@
                        soself->s_size);
                return NULL;
        }
-       result = s_unpack_internal(soself, vbuf.buf + offset);
+       result = s_unpack_internal(soself, (char*)vbuf.buf + offset);
        PyObject_ReleaseBuffer(input, &vbuf);
        return result;
 }

Modified: python/branches/py3k-pep3137/Objects/exceptions.c
==============================================================================
--- python/branches/py3k-pep3137/Objects/exceptions.c   (original)
+++ python/branches/py3k-pep3137/Objects/exceptions.c   Sat Nov  3 16:18:59 2007
@@ -1482,7 +1482,6 @@
     PyUnicodeErrorObject *uself = (PyUnicodeErrorObject *)self;
 
     if (uself->end==uself->start+1) {
-        assert(PyString_Check(((PyUnicodeErrorObject *)self)->object));
         int byte = (int)(PyString_AS_STRING(((PyUnicodeErrorObject 
*)self)->object)[uself->start]&0xff);
         return PyUnicode_FromFormat(
             "'%U' codec can't decode byte 0x%02x in position %zd: %U",
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to