diff Objects/complexobject.c @ 47471:71bed208fe50 legacy-trunk

Fixed complex.__getnewargs__() to not emit another complex object.
author Alexandre Vassalotti <alexandre@peadrop.com>
date Wed, 04 Jun 2008 20:41:44 +0000
parents 4fe192d48960
children 52294af4b663
line wrap: on
line diff
--- a/Objects/complexobject.c	Wed Jun 04 20:22:05 2008 +0000
+++ b/Objects/complexobject.c	Wed Jun 04 20:41:44 2008 +0000
@@ -822,7 +822,8 @@
 static PyObject *
 complex_getnewargs(PyComplexObject *v)
 {
-	return Py_BuildValue("(D)", &v->cval);
+	Py_complex c = v->cval;
+	return Py_BuildValue("(dd)", c.real, c.imag);
 }
 
 #if 0