comparison Python/Python-ast.c @ 62566:504c499e8c95

Merged revisions 81465-81466,81468,81679,81735,81760,81868,82183 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81465 | georg.brandl | 2010-05-22 06:29:19 -0500 (Sat, 22 May 2010) | 2 lines Issue #3924: Ignore cookies with invalid "version" field in cookielib. ........ r81466 | georg.brandl | 2010-05-22 06:31:16 -0500 (Sat, 22 May 2010) | 1 line Underscore the name of an internal utility function. ........ r81468 | georg.brandl | 2010-05-22 06:43:25 -0500 (Sat, 22 May 2010) | 1 line #8635: document enumerate() start parameter in docstring. ........ r81679 | benjamin.peterson | 2010-06-03 16:21:03 -0500 (Thu, 03 Jun 2010) | 1 line use a set for membership testing ........ r81735 | michael.foord | 2010-06-05 06:46:59 -0500 (Sat, 05 Jun 2010) | 1 line Extract error message truncating into a method (unittest.TestCase._truncateMessage). ........ r81760 | michael.foord | 2010-06-05 14:38:42 -0500 (Sat, 05 Jun 2010) | 1 line Issue 8302. SkipTest exception is setUpClass or setUpModule is now reported as a skip rather than an error. ........ r81868 | benjamin.peterson | 2010-06-09 14:45:04 -0500 (Wed, 09 Jun 2010) | 1 line fix code formatting ........ r82183 | benjamin.peterson | 2010-06-23 15:29:26 -0500 (Wed, 23 Jun 2010) | 1 line cpython only gc tests ........
author Benjamin Peterson <benjamin@python.org>
date Sun, 27 Jun 2010 21:45:24 +0000
parents 3cf35231f7d3
children e37344a8f0c9
comparison
equal deleted inserted replaced
62565:820f3b6cb551 62566:504c499e8c95
535 535
536 static int add_attributes(PyTypeObject* type, char**attrs, int num_fields) 536 static int add_attributes(PyTypeObject* type, char**attrs, int num_fields)
537 { 537 {
538 int i, result; 538 int i, result;
539 PyObject *s, *l = PyTuple_New(num_fields); 539 PyObject *s, *l = PyTuple_New(num_fields);
540 if (!l) return 0; 540 if (!l)
541 for(i = 0; i < num_fields; i++) { 541 return 0;
542 for (i = 0; i < num_fields; i++) {
542 s = PyUnicode_FromString(attrs[i]); 543 s = PyUnicode_FromString(attrs[i]);
543 if (!s) { 544 if (!s) {
544 Py_DECREF(l); 545 Py_DECREF(l);
545 return 0; 546 return 0;
546 } 547 }