mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
changes for complex numbers
This commit is contained in:
parent
0bfd6c33fa
commit
8a5c5d277e
3 changed files with 111 additions and 1 deletions
|
@ -498,6 +498,17 @@ convertsimple1(arg, p_format, p_va)
|
|||
break;
|
||||
}
|
||||
|
||||
case 'D': /* complex double */
|
||||
{
|
||||
complex *p = va_arg(*p_va, complex *);
|
||||
complex cval = PyComplex_AsCComplex(arg);
|
||||
if (err_occurred())
|
||||
return "complex<D>";
|
||||
else
|
||||
*p = cval;
|
||||
break;
|
||||
}
|
||||
|
||||
case 'c': /* char */
|
||||
{
|
||||
char *p = va_arg(*p_va, char *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue