[Python-3000-checkins] r56018 - in python/branches/p3yk: Doc/api/concrete.tex Doc/howto/unicode.rst Doc/lib/libsqlite3.tex Include/pyerrors.h Include/structmember.h Misc/developers.txt Objects/exceptions.c PC/pyconfig.h Python/structmember.c Tools/buildbot/README.tcltk-AMD64 Tools/buildbot/external-amd64.bat

neal.norwitz python-3000-checkins at python.org
Mon Jun 18 05:56:04 CEST 2007


Author: neal.norwitz
Date: Mon Jun 18 05:55:43 2007
New Revision: 56018

Added:
   python/branches/p3yk/Tools/buildbot/README.tcltk-AMD64
      - copied unchanged from r56012, python/trunk/Tools/buildbot/README.tcltk-AMD64
Modified:
   python/branches/p3yk/   (props changed)
   python/branches/p3yk/Doc/api/concrete.tex
   python/branches/p3yk/Doc/howto/unicode.rst
   python/branches/p3yk/Doc/lib/libsqlite3.tex
   python/branches/p3yk/Include/pyerrors.h
   python/branches/p3yk/Include/structmember.h
   python/branches/p3yk/Misc/developers.txt
   python/branches/p3yk/Objects/exceptions.c
   python/branches/p3yk/PC/pyconfig.h
   python/branches/p3yk/Python/structmember.c
   python/branches/p3yk/Tools/buildbot/external-amd64.bat
Log:
Merged revisions 55951-56013 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r55956 | thomas.heller | 2007-06-13 00:07:03 -0700 (Wed, 13 Jun 2007) | 2 lines
  
  Do not hardcode the buildbot's directory name.
........
  r55957 | thomas.heller | 2007-06-13 00:07:41 -0700 (Wed, 13 Jun 2007) | 2 lines
  
  Notes about building tcl/tk for windows/AMD64.
........
  r55958 | thomas.heller | 2007-06-13 00:54:57 -0700 (Wed, 13 Jun 2007) | 2 lines
  
  Build bzip2.
........
  r55962 | walter.doerwald | 2007-06-13 09:57:12 -0700 (Wed, 13 Jun 2007) | 8 lines
  
  Add T_PYSSIZET in structmember.h: This can be used for
  Py_ssize_t members.
  
  Simplify the implementation of UnicodeError objects:
  start and end attributes are now stored directly as
  Py_ssize_t members, which simplifies various get and
  set functions.
........
  r55975 | martin.v.loewis | 2007-06-14 13:46:25 -0700 (Thu, 14 Jun 2007) | 3 lines
  
  Patch #1734014: Use _I64_MAX instead of LLONG_MAX.
  Will backport to 2.5.
........
  r55984 | neal.norwitz | 2007-06-14 20:11:41 -0700 (Thu, 14 Jun 2007) | 4 lines
  
  urllib2_localnet says it leaks probably due to threads. So ignore it.
  popen2 is also complaining probably for similar reasons.
  make install always reports failure, so don't mail in this case.
........
  r56001 | andrew.kuchling | 2007-06-15 15:43:03 -0700 (Fri, 15 Jun 2007) | 1 line
  
  Add a word
........
  r56005 | martin.v.loewis | 2007-06-16 03:08:43 -0700 (Sat, 16 Jun 2007) | 2 lines
  
  Mention Senthil Kumaran.
........
  r56006 | georg.brandl | 2007-06-16 10:10:12 -0700 (Sat, 16 Jun 2007) | 2 lines
  
  Add missing \versionadded.
........
  r56009 | neal.norwitz | 2007-06-17 11:48:32 -0700 (Sun, 17 Jun 2007) | 1 line
  
  SF #1738670, make example in doc work
........
  r56011 | neal.norwitz | 2007-06-17 19:46:36 -0700 (Sun, 17 Jun 2007) | 1 line
  
  SF #1738754, remove extra backslash in string
........
  r56012 | neal.norwitz | 2007-06-17 19:50:15 -0700 (Sun, 17 Jun 2007) | 1 line
  
  Revert last change for SF #1738754, there's no print in there.
........


Modified: python/branches/p3yk/Doc/api/concrete.tex
==============================================================================
--- python/branches/p3yk/Doc/api/concrete.tex	(original)
+++ python/branches/p3yk/Doc/api/concrete.tex	Mon Jun 18 05:55:43 2007
@@ -99,6 +99,7 @@
 
 \begin{csimplemacrodesc}{Py_RETURN_NONE}
   Properly handle returning \cdata{Py_None} from within a C function.
+  \versionadded{2.4}
 \end{csimplemacrodesc}
 
 

Modified: python/branches/p3yk/Doc/howto/unicode.rst
==============================================================================
--- python/branches/p3yk/Doc/howto/unicode.rst	(original)
+++ python/branches/p3yk/Doc/howto/unicode.rst	Mon Jun 18 05:55:43 2007
@@ -152,7 +152,7 @@
 4. Many Internet standards are defined in terms of textual data, and 
    can't handle content with embedded zero bytes.
 
-Generally people don't use this encoding, choosing other encodings
+Generally people don't use this encoding, instead choosing other encodings
 that are more efficient and convenient.
 
 Encodings don't have to handle every possible Unicode character, and

Modified: python/branches/p3yk/Doc/lib/libsqlite3.tex
==============================================================================
--- python/branches/p3yk/Doc/lib/libsqlite3.tex	(original)
+++ python/branches/p3yk/Doc/lib/libsqlite3.tex	Mon Jun 18 05:55:43 2007
@@ -42,6 +42,12 @@
 # Insert a row of data
 c.execute("""insert into stocks
           values ('2006-01-05','BUY','RHAT',100,35.14)""")
+
+# Save (commit) the changes
+conn.commit()
+
+# We can also close the cursor if we are done with it
+c.close()
 \end{verbatim}    
 
 Usually your SQL operations will need to use values from Python

Modified: python/branches/p3yk/Include/pyerrors.h
==============================================================================
--- python/branches/p3yk/Include/pyerrors.h	(original)
+++ python/branches/p3yk/Include/pyerrors.h	Mon Jun 18 05:55:43 2007
@@ -31,8 +31,8 @@
     PyObject *args;
     PyObject *encoding;
     PyObject *object;
-    PyObject *start;
-    PyObject *end;
+    Py_ssize_t start;
+    Py_ssize_t end;
     PyObject *reason;
 } PyUnicodeErrorObject;
 #endif

Modified: python/branches/p3yk/Include/structmember.h
==============================================================================
--- python/branches/p3yk/Include/structmember.h	(original)
+++ python/branches/p3yk/Include/structmember.h	Mon Jun 18 05:55:43 2007
@@ -68,9 +68,10 @@
 #ifdef HAVE_LONG_LONG
 #define T_LONGLONG      17  
 #define T_ULONGLONG     18
+#define T_PYSSIZET       19 /* Py_ssize_t */
 #endif /* HAVE_LONG_LONG */
 
-#define T_NONE          19      /* Value is always None */
+#define T_NONE          20      /* Value is always None */
 
 /* Flags */
 #define READONLY	1

Modified: python/branches/p3yk/Misc/developers.txt
==============================================================================
--- python/branches/p3yk/Misc/developers.txt	(original)
+++ python/branches/p3yk/Misc/developers.txt	Mon Jun 18 05:55:43 2007
@@ -17,6 +17,10 @@
 Permissions History
 -------------------
 
+- Senthil Kumaran  was given SVN access on June 16 2007
+  by MvL, for his Summer-of-Code project, mentored by
+  Skip Montanaro.
+
 - Alexandre Vassalotti was given SVN access on May 21 2007
   by MvL, for his Summer-of-Code project, mentored by
   Brett Cannon.

Modified: python/branches/p3yk/Objects/exceptions.c
==============================================================================
--- python/branches/p3yk/Objects/exceptions.c	(original)
+++ python/branches/p3yk/Objects/exceptions.c	Mon Jun 18 05:55:43 2007
@@ -1149,36 +1149,6 @@
                        "Unicode related error.");
 
 #ifdef Py_USING_UNICODE
-static int
-get_int(PyObject *attr, Py_ssize_t *value, const char *name)
-{
-    if (!attr) {
-        PyErr_Format(PyExc_TypeError, "%.200s attribute not set", name);
-        return -1;
-    }
-
-    if (PyLong_Check(attr)) {
-        *value = PyLong_AsSsize_t(attr);
-        if (*value == -1 && PyErr_Occurred())
-            return -1;
-    } else {
-        PyErr_Format(PyExc_TypeError, "%.200s attribute must be int", name);
-        return -1;
-    }
-    return 0;
-}
-
-static int
-set_ssize_t(PyObject **attr, Py_ssize_t value)
-{
-    PyObject *obj = PyInt_FromSsize_t(value);
-    if (!obj)
-        return -1;
-    Py_CLEAR(*attr);
-    *attr = obj;
-    return 0;
-}
-
 static PyObject *
 get_string(PyObject *attr, const char *name)
 {
@@ -1258,40 +1228,38 @@
 int
 PyUnicodeEncodeError_GetStart(PyObject *exc, Py_ssize_t *start)
 {
-    if (!get_int(((PyUnicodeErrorObject *)exc)->start, start, "start")) {
-        Py_ssize_t size;
-        PyObject *obj = get_unicode(((PyUnicodeErrorObject *)exc)->object,
-                                    "object");
-        if (!obj) return -1;
-        size = PyUnicode_GET_SIZE(obj);
-        if (*start<0)
-            *start = 0; /*XXX check for values <0*/
-        if (*start>=size)
-            *start = size-1;
-        Py_DECREF(obj);
-        return 0;
-    }
-    return -1;
+    Py_ssize_t size;
+    PyObject *obj = get_unicode(((PyUnicodeErrorObject *)exc)->object,
+                                "object");
+    if (!obj)
+        return -1;
+    *start = ((PyUnicodeErrorObject *)exc)->start;
+    size = PyUnicode_GET_SIZE(obj);
+    if (*start<0)
+        *start = 0; /*XXX check for values <0*/
+    if (*start>=size)
+        *start = size-1;
+    Py_DECREF(obj);
+    return 0;
 }
 
 
 int
 PyUnicodeDecodeError_GetStart(PyObject *exc, Py_ssize_t *start)
 {
-    if (!get_int(((PyUnicodeErrorObject *)exc)->start, start, "start")) {
-        Py_ssize_t size;
-        PyObject *obj = get_string(((PyUnicodeErrorObject *)exc)->object,
-                                   "object");
-        if (!obj) return -1;
-        size = PyString_GET_SIZE(obj);
-        if (*start<0)
-            *start = 0;
-        if (*start>=size)
-            *start = size-1;
-        Py_DECREF(obj);
-        return 0;
-    }
-    return -1;
+    Py_ssize_t size;
+    PyObject *obj = get_string(((PyUnicodeErrorObject *)exc)->object,
+                               "object");
+    if (!obj)
+        return -1;
+    size = PyString_GET_SIZE(obj);
+    *start = ((PyUnicodeErrorObject *)exc)->start;
+    if (*start<0)
+        *start = 0;
+    if (*start>=size)
+        *start = size-1;
+    Py_DECREF(obj);
+    return 0;
 }
 
 
@@ -1305,61 +1273,62 @@
 int
 PyUnicodeEncodeError_SetStart(PyObject *exc, Py_ssize_t start)
 {
-    return set_ssize_t(&((PyUnicodeErrorObject *)exc)->start, start);
+    ((PyUnicodeErrorObject *)exc)->start = start;
+    return 0;
 }
 
 
 int
 PyUnicodeDecodeError_SetStart(PyObject *exc, Py_ssize_t start)
 {
-    return set_ssize_t(&((PyUnicodeErrorObject *)exc)->start, start);
+    ((PyUnicodeErrorObject *)exc)->start = start;
+    return 0;
 }
 
 
 int
 PyUnicodeTranslateError_SetStart(PyObject *exc, Py_ssize_t start)
 {
-    return set_ssize_t(&((PyUnicodeErrorObject *)exc)->start, start);
+    ((PyUnicodeErrorObject *)exc)->start = start;
+    return 0;
 }
 
 
 int
 PyUnicodeEncodeError_GetEnd(PyObject *exc, Py_ssize_t *end)
 {
-    if (!get_int(((PyUnicodeErrorObject *)exc)->end, end, "end")) {
-        Py_ssize_t size;
-        PyObject *obj = get_unicode(((PyUnicodeErrorObject *)exc)->object,
-                                    "object");
-        if (!obj) return -1;
-        size = PyUnicode_GET_SIZE(obj);
-        if (*end<1)
-            *end = 1;
-        if (*end>size)
-            *end = size;
-        Py_DECREF(obj);
-        return 0;
-    }
-    return -1;
+    Py_ssize_t size;
+    PyObject *obj = get_unicode(((PyUnicodeErrorObject *)exc)->object,
+                                "object");
+    if (!obj)
+        return -1;
+    *end = ((PyUnicodeErrorObject *)exc)->end;
+    size = PyUnicode_GET_SIZE(obj);
+    if (*end<1)
+        *end = 1;
+    if (*end>size)
+        *end = size;
+    Py_DECREF(obj);
+    return 0;
 }
 
 
 int
 PyUnicodeDecodeError_GetEnd(PyObject *exc, Py_ssize_t *end)
 {
-    if (!get_int(((PyUnicodeErrorObject *)exc)->end, end, "end")) {
-        Py_ssize_t size;
-        PyObject *obj = get_string(((PyUnicodeErrorObject *)exc)->object,
-                                   "object");
-        if (!obj) return -1;
-        size = PyString_GET_SIZE(obj);
-        if (*end<1)
-            *end = 1;
-        if (*end>size)
-            *end = size;
-        Py_DECREF(obj);
-        return 0;
-    }
-    return -1;
+    Py_ssize_t size;
+    PyObject *obj = get_string(((PyUnicodeErrorObject *)exc)->object,
+                               "object");
+    if (!obj)
+        return -1;
+    *end = ((PyUnicodeErrorObject *)exc)->end;
+    size = PyString_GET_SIZE(obj);
+    if (*end<1)
+        *end = 1;
+    if (*end>size)
+        *end = size;
+    Py_DECREF(obj);
+    return 0;
 }
 
 
@@ -1373,21 +1342,24 @@
 int
 PyUnicodeEncodeError_SetEnd(PyObject *exc, Py_ssize_t end)
 {
-    return set_ssize_t(&((PyUnicodeErrorObject *)exc)->end, end);
+    ((PyUnicodeErrorObject *)exc)->end = end;
+    return 0;
 }
 
 
 int
 PyUnicodeDecodeError_SetEnd(PyObject *exc, Py_ssize_t end)
 {
-    return set_ssize_t(&((PyUnicodeErrorObject *)exc)->end, end);
+    ((PyUnicodeErrorObject *)exc)->end = end;
+    return 0;
 }
 
 
 int
 PyUnicodeTranslateError_SetEnd(PyObject *exc, Py_ssize_t end)
 {
-    return set_ssize_t(&((PyUnicodeErrorObject *)exc)->end, end);
+    ((PyUnicodeErrorObject *)exc)->end = end;
+    return 0;
 }
 
 PyObject *
@@ -1438,25 +1410,20 @@
 {
     Py_CLEAR(self->encoding);
     Py_CLEAR(self->object);
-    Py_CLEAR(self->start);
-    Py_CLEAR(self->end);
     Py_CLEAR(self->reason);
 
-    if (!PyArg_ParseTuple(args, "O!O!O!O!O!",
+    if (!PyArg_ParseTuple(args, "O!O!nnO!",
         &PyString_Type, &self->encoding,
         objecttype, &self->object,
-        &PyLong_Type, &self->start,
-        &PyLong_Type, &self->end,
+        &self->start,
+        &self->end,
         &PyString_Type, &self->reason)) {
-        self->encoding = self->object = self->start = self->end =
-            self->reason = NULL;
+        self->encoding = self->object = self->reason = NULL;
         return -1;
     }
 
     Py_INCREF(self->encoding);
     Py_INCREF(self->object);
-    Py_INCREF(self->start);
-    Py_INCREF(self->end);
     Py_INCREF(self->reason);
 
     return 0;
@@ -1467,8 +1434,6 @@
 {
     Py_CLEAR(self->encoding);
     Py_CLEAR(self->object);
-    Py_CLEAR(self->start);
-    Py_CLEAR(self->end);
     Py_CLEAR(self->reason);
     return BaseException_clear((PyBaseExceptionObject *)self);
 }
@@ -1486,8 +1451,6 @@
 {
     Py_VISIT(self->encoding);
     Py_VISIT(self->object);
-    Py_VISIT(self->start);
-    Py_VISIT(self->end);
     Py_VISIT(self->reason);
     return BaseException_traverse((PyBaseExceptionObject *)self, visit, arg);
 }
@@ -1497,9 +1460,9 @@
         PyDoc_STR("exception encoding")},
     {"object", T_OBJECT, offsetof(PyUnicodeErrorObject, object), 0,
         PyDoc_STR("exception object")},
-    {"start", T_OBJECT, offsetof(PyUnicodeErrorObject, start), 0,
+    {"start", T_PYSSIZET, offsetof(PyUnicodeErrorObject, start), 0,
         PyDoc_STR("exception start")},
-    {"end", T_OBJECT, offsetof(PyUnicodeErrorObject, end), 0,
+    {"end", T_PYSSIZET, offsetof(PyUnicodeErrorObject, end), 0,
         PyDoc_STR("exception end")},
     {"reason", T_OBJECT, offsetof(PyUnicodeErrorObject, reason), 0,
         PyDoc_STR("exception reason")},
@@ -1523,17 +1486,10 @@
 static PyObject *
 UnicodeEncodeError_str(PyObject *self)
 {
-    Py_ssize_t start;
-    Py_ssize_t end;
-
-    if (PyUnicodeEncodeError_GetStart(self, &start))
-        return NULL;
-
-    if (PyUnicodeEncodeError_GetEnd(self, &end))
-        return NULL;
+    PyUnicodeErrorObject *uself = (PyUnicodeErrorObject *)self;
 
-    if (end==start+1) {
-        int badchar = (int)PyUnicode_AS_UNICODE(((PyUnicodeErrorObject *)self)->object)[start];
+    if (uself->end==uself->start+1) {
+        int badchar = (int)PyUnicode_AS_UNICODE(uself->object)[uself->start];
         char badchar_str[20];
         if (badchar <= 0xff)
             PyOS_snprintf(badchar_str, sizeof(badchar_str), "x%02x", badchar);
@@ -1543,18 +1499,18 @@
             PyOS_snprintf(badchar_str, sizeof(badchar_str), "U%08x", badchar);
         return PyString_FromFormat(
             "'%.400s' codec can't encode character u'\\%s' in position %zd: %.400s",
-            PyString_AS_STRING(((PyUnicodeErrorObject *)self)->encoding),
+            PyString_AS_STRING(uself->encoding),
             badchar_str,
-            start,
-            PyString_AS_STRING(((PyUnicodeErrorObject *)self)->reason)
+            uself->start,
+            PyString_AS_STRING(uself->reason)
         );
     }
     return PyString_FromFormat(
         "'%.400s' codec can't encode characters in position %zd-%zd: %.400s",
-        PyString_AS_STRING(((PyUnicodeErrorObject *)self)->encoding),
-        start,
-        (end-1),
-        PyString_AS_STRING(((PyUnicodeErrorObject *)self)->reason)
+        PyString_AS_STRING(uself->encoding),
+        uself->start,
+        uself->end-1,
+        PyString_AS_STRING(uself->reason)
     );
 }
 
@@ -1599,34 +1555,27 @@
 static PyObject *
 UnicodeDecodeError_str(PyObject *self)
 {
-    Py_ssize_t start = 0;
-    Py_ssize_t end = 0;
+    PyUnicodeErrorObject *uself = (PyUnicodeErrorObject *)self;
 
-    if (PyUnicodeDecodeError_GetStart(self, &start))
-    return NULL;
-
-    if (PyUnicodeDecodeError_GetEnd(self, &end))
-    return NULL;
-
-    if (end==start+1) {
+    if (uself->end==uself->start+1) {
         /* FromFormat does not support %02x, so format that separately */
         char byte[4];
         PyOS_snprintf(byte, sizeof(byte), "%02x",
-                      ((int)PyString_AS_STRING(((PyUnicodeErrorObject *)self)->object)[start])&0xff);
+                      ((int)PyString_AS_STRING(uself->object)[uself->start])&0xff);
         return PyString_FromFormat(
             "'%.400s' codec can't decode byte 0x%s in position %zd: %.400s",
-            PyString_AS_STRING(((PyUnicodeErrorObject *)self)->encoding),
+            PyString_AS_STRING(uself->encoding),
             byte,
-            start,
-            PyString_AS_STRING(((PyUnicodeErrorObject *)self)->reason)
+            uself->start,
+            PyString_AS_STRING(uself->reason)
         );
     }
     return PyString_FromFormat(
         "'%.400s' codec can't decode bytes in position %zd-%zd: %.400s",
-        PyString_AS_STRING(((PyUnicodeErrorObject *)self)->encoding),
-        start,
-        (end-1),
-        PyString_AS_STRING(((PyUnicodeErrorObject *)self)->reason)
+        PyString_AS_STRING(uself->encoding),
+        uself->start,
+        uself->end-1,
+        PyString_AS_STRING(uself->reason)
     );
 }
 
@@ -1670,22 +1619,18 @@
         return -1;
 
     Py_CLEAR(self->object);
-    Py_CLEAR(self->start);
-    Py_CLEAR(self->end);
     Py_CLEAR(self->reason);
 
-    if (!PyArg_ParseTuple(args, "O!O!O!O!",
+    if (!PyArg_ParseTuple(args, "O!nnO!",
         &PyUnicode_Type, &self->object,
-        &PyLong_Type, &self->start,
-        &PyLong_Type, &self->end,
+        &self->start,
+        &self->end,
         &PyString_Type, &self->reason)) {
-        self->object = self->start = self->end = self->reason = NULL;
+        self->object = self->reason = NULL;
         return -1;
     }
 
     Py_INCREF(self->object);
-    Py_INCREF(self->start);
-    Py_INCREF(self->end);
     Py_INCREF(self->reason);
 
     return 0;
@@ -1695,17 +1640,10 @@
 static PyObject *
 UnicodeTranslateError_str(PyObject *self)
 {
-    Py_ssize_t start;
-    Py_ssize_t end;
-
-    if (PyUnicodeTranslateError_GetStart(self, &start))
-        return NULL;
-
-    if (PyUnicodeTranslateError_GetEnd(self, &end))
-        return NULL;
+    PyUnicodeErrorObject *uself = (PyUnicodeErrorObject *)self;
 
-    if (end==start+1) {
-        int badchar = (int)PyUnicode_AS_UNICODE(((PyUnicodeErrorObject *)self)->object)[start];
+    if (uself->end==uself->start+1) {
+        int badchar = (int)PyUnicode_AS_UNICODE(uself->object)[uself->start];
         char badchar_str[20];
         if (badchar <= 0xff)
             PyOS_snprintf(badchar_str, sizeof(badchar_str), "x%02x", badchar);
@@ -1716,15 +1654,15 @@
         return PyString_FromFormat(
             "can't translate character u'\\%s' in position %zd: %.400s",
             badchar_str,
-            start,
-            PyString_AS_STRING(((PyUnicodeErrorObject *)self)->reason)
+            uself->start,
+            PyString_AS_STRING(uself->reason)
         );
     }
     return PyString_FromFormat(
         "can't translate characters in position %zd-%zd: %.400s",
-        start,
-        (end-1),
-        PyString_AS_STRING(((PyUnicodeErrorObject *)self)->reason)
+        uself->start,
+        uself->end-1,
+        PyString_AS_STRING(uself->reason)
     );
 }
 

Modified: python/branches/p3yk/PC/pyconfig.h
==============================================================================
--- python/branches/p3yk/PC/pyconfig.h	(original)
+++ python/branches/p3yk/PC/pyconfig.h	Mon Jun 18 05:55:43 2007
@@ -275,9 +275,9 @@
 #define HAVE_LONG_LONG 1
 #ifndef PY_LONG_LONG
 #	define PY_LONG_LONG __int64
-#	define PY_LLONG_MAX LLONG_MAX
-#	define PY_LLONG_MIN LLONG_MIN
-#	define PY_ULLONG_MAX ULLONG_MAX
+#	define PY_LLONG_MAX _I64_MAX
+#	define PY_LLONG_MIN _I64_MIN
+#	define PY_ULLONG_MAX _UI64_MAX
 #endif
 
 /* For Windows the Python core is in a DLL by default.  Test

Modified: python/branches/p3yk/Python/structmember.c
==============================================================================
--- python/branches/p3yk/Python/structmember.c	(original)
+++ python/branches/p3yk/Python/structmember.c	Mon Jun 18 05:55:43 2007
@@ -81,6 +81,9 @@
 	case T_ULONG:
 		v = PyLong_FromUnsignedLong(*(unsigned long*)addr);
 		break;
+	case T_PYSSIZET:
+		v = PyInt_FromSsize_t(*(Py_ssize_t*)addr);
+		break;
 	case T_FLOAT:
 		v = PyFloat_FromDouble((double)*(float*)addr);
 		break;
@@ -259,6 +262,13 @@
 		}
 		break;
 		}
+	case T_PYSSIZET:{
+		*(Py_ssize_t*)addr = PyInt_AsSsize_t(v);
+		if ((*(Py_ssize_t*)addr == (Py_ssize_t)-1)
+		    && PyErr_Occurred())
+				return -1;
+		break;
+		}
 	case T_FLOAT:{
 		double double_val;
 		double_val = PyFloat_AsDouble(v);

Modified: python/branches/p3yk/Tools/buildbot/external-amd64.bat
==============================================================================
--- python/branches/p3yk/Tools/buildbot/external-amd64.bat	(original)
+++ python/branches/p3yk/Tools/buildbot/external-amd64.bat	Mon Jun 18 05:55:43 2007
@@ -7,23 +7,29 @@
 call "%MSSdk%\SetEnv" /XP64 /RETAIL
 
 @rem Assume we start inside the Python source directory
+for %%i in (.) do set CWD=%%~fi
 cd ..
 
 @rem sqlite
 if not exist sqlite-source-3.3.4 (
    svn export http://svn.python.org/projects/external/sqlite-source-3.3.4
-   if exist build\PCbuild\sqlite3.dll del build\PCbuild\sqlite3.dll
+   if exist %CWD%\PCbuild\sqlite3.dll del %CWD%\PCbuild\sqlite3.dll
 )
-if not exist build\PCbuild\sqlite3.dll (
+if not exist %CWD%\PCbuild\sqlite3.dll (
    cd sqlite-source-3.3.4\amd64
    cl ..\*.c
    link /def:..\sqlite3.def  /dll *.obj /out:sqlite3.dll bufferoverflowU.lib
    cd ..\..
-   copy sqlite-source-3.3.4\amd64\sqlite3.dll build\PCbuild
+   copy sqlite-source-3.3.4\amd64\sqlite3.dll %CWD%\PCbuild
 )
 
 @rem bzip
 if not exist bzip2-1.0.3 svn export http://svn.python.org/projects/external/bzip2-1.0.3
+if not exist bzip2-1.0.3\libbz2.lib (
+   cd bzip2-1.0.3
+   nmake /f makefile.msc CFLAGS="-DWIN32 -MD -Ox -D_FILE_OFFSET_BITS=64 -nologo /GS-"
+   cd ..
+)
 
 @rem Sleepycat db
 if not exist db-4.4.20 svn export http://svn.python.org/projects/external/db-4.4.20


More information about the Python-3000-checkins mailing list