Mercurial > cpython-lru_cache-weakref
diff Python/modsupport.c @ 17032:d5811af8acf3 legacy-trunk
Py_BuildValue(): Add "D" conversion to create a Python complex value from
a Py_complex C value.
Patch by Walter Dörwald.
This partially closes SF patch #407148.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Mon, 12 Mar 2001 21:03:26 +0000 |
| parents | 25ddd3dc7a7a |
| children | ab5355d873dd 79c676f9b34a |
line wrap: on
line diff
--- a/Python/modsupport.c Mon Mar 12 02:56:15 2001 +0000 +++ b/Python/modsupport.c Mon Mar 12 21:03:26 2001 +0000 @@ -286,6 +286,12 @@ return PyFloat_FromDouble( (double)va_arg(*p_va, va_double)); +#ifndef WITHOUT_COMPLEX + case 'D': + return PyComplex_FromCComplex( + *((Py_complex *)va_arg(*p_va, Py_complex *))); +#endif /* WITHOUT_COMPLEX */ + case 'c': { char p[1];
