Merged revisions 60441-60474 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r60441 | christian.heimes | 2008-01-30 12:46:00 +0100 (Wed, 30 Jan 2008) | 1 line

  Removed unused var
........
  r60448 | christian.heimes | 2008-01-30 18:21:22 +0100 (Wed, 30 Jan 2008) | 1 line

  Fixed some references leaks in sys.
........
  r60450 | christian.heimes | 2008-01-30 19:58:29 +0100 (Wed, 30 Jan 2008) | 1 line

  The previous change was causing a segfault after multiple calls to Py_Initialize() and Py_Finalize().
........
  r60463 | raymond.hettinger | 2008-01-30 23:17:31 +0100 (Wed, 30 Jan 2008) | 1 line

  Update itertool recipes
........
  r60464 | christian.heimes | 2008-01-30 23:54:18 +0100 (Wed, 30 Jan 2008) | 1 line

  Bug #1234: Fixed semaphore errors on AIX 5.2
........
  r60469 | raymond.hettinger | 2008-01-31 02:38:15 +0100 (Thu, 31 Jan 2008) | 6 lines

  Fix defect in __ixor__ which would get the wrong
  answer if the input iterable had a duplicate element
  (two calls to toggle() reverse each other).  Borrow
  the correct code from sets.py.
........
  r60470 | raymond.hettinger | 2008-01-31 02:42:11 +0100 (Thu, 31 Jan 2008) | 1 line

  Missing return
........
  r60471 | jeffrey.yasskin | 2008-01-31 08:44:11 +0100 (Thu, 31 Jan 2008) | 4 lines

  Added more documentation on how mixed-mode arithmetic should be implemented. I
  also noticed and fixed a bug in Rational's forward operators (they were
  claiming all instances of numbers.Rational instead of just the concrete types).
........
This commit is contained in:
Christian Heimes 2008-01-31 14:31:45 +00:00
parent 4b8db419c2
commit 7b3ce6a17e
11 changed files with 275 additions and 60 deletions

View file

@ -106,15 +106,9 @@ static PyStructSequence_Desc floatinfo_desc = {
PyObject *
PyFloat_GetInfo(void)
{
static PyObject* floatinfo;
PyObject* floatinfo;
int pos = 0;
if (floatinfo != NULL) {
Py_INCREF(floatinfo);
return floatinfo;
}
PyStructSequence_InitType(&FloatInfoType, &floatinfo_desc);
floatinfo = PyStructSequence_New(&FloatInfoType);
if (floatinfo == NULL) {
return NULL;
@ -143,8 +137,6 @@ PyFloat_GetInfo(void)
Py_CLEAR(floatinfo);
return NULL;
}
Py_INCREF(floatinfo);
return floatinfo;
}
@ -1601,6 +1593,9 @@ _PyFloat_Init(void)
/* Initialize floating point repr */
_PyFloat_DigitsInit();
#endif
/* Init float info */
if (FloatInfoType.tp_name == 0)
PyStructSequence_InitType(&FloatInfoType, &floatinfo_desc);
}
void