summaryrefslogtreecommitdiffstats
path: root/Python/getargs.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-01-12 01:09:56 (GMT)
committerGuido van Rossum <guido@python.org>1996-01-12 01:09:56 (GMT)
commit8a5c5d277eba096c4f12fdcdf5b3550d63f6bc56 (patch)
tree61baa912d1a052436cda4215a6f53c856b9a6a95 /Python/getargs.c
parent0bfd6c33fa5af32a0e095bf2c3f645db259ef96c (diff)
downloadcpython-8a5c5d277eba096c4f12fdcdf5b3550d63f6bc56.zip
cpython-8a5c5d277eba096c4f12fdcdf5b3550d63f6bc56.tar.gz
cpython-8a5c5d277eba096c4f12fdcdf5b3550d63f6bc56.tar.bz2
changes for complex numbers
Diffstat (limited to 'Python/getargs.c')
-rw-r--r--Python/getargs.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/Python/getargs.c b/Python/getargs.c
index cd3ff6d..7ec31c3 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -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 *);