[Python-checkins] cpython (3.3): Handle yet another potential failure in testcapi

christian.heimes python-checkins at python.org
Fri Jul 26 15:54:24 CEST 2013


http://hg.python.org/cpython/rev/32ebd1846d07
changeset:   84840:32ebd1846d07
branch:      3.3
parent:      84838:7d6781ec35ea
user:        Christian Heimes <christian at cheimes.de>
date:        Fri Jul 26 15:54:07 2013 +0200
summary:
  Handle yet another potential failure in testcapi
CID 1058280

files:
  Modules/_testcapimodule.c |  2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -2249,6 +2249,8 @@
 
     /* Test 7: Perform medium int addition */
     op1 = PyLong_FromLong(1000);
+    if (op1 == NULL)
+        return NULL;
     gettimeofday(&start, NULL);
     for(i=0; i < 10000000; i++) {
         result = PyNumber_Add(op1, op1);

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list