diff options
author | Guido van Rossum <guido@python.org> | 1996-01-12 01:09:56 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-01-12 01:09:56 (GMT) |
commit | 8a5c5d277eba096c4f12fdcdf5b3550d63f6bc56 (patch) | |
tree | 61baa912d1a052436cda4215a6f53c856b9a6a95 /Python/getargs.c | |
parent | 0bfd6c33fa5af32a0e095bf2c3f645db259ef96c (diff) | |
download | cpython-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.c | 11 |
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 *); |