Mercurial > cpython-lru_cache-weakref
comparison Python/getargs.c @ 56594:0f9e8d3ecac3
Issue 7147 - remove ability to attempt to build Python without complex number support (was broken anyway)
| author | Skip Montanaro <skip@pobox.com> |
|---|---|
| date | Sun, 18 Oct 2009 14:25:35 +0000 |
| parents | 5095a5276d8c |
| children | 5c681ecc9967 |
comparison
equal
deleted
inserted
replaced
| 56592:098ba3a63730 | 56594:0f9e8d3ecac3 |
|---|---|
| 816 else | 816 else |
| 817 *p = dval; | 817 *p = dval; |
| 818 break; | 818 break; |
| 819 } | 819 } |
| 820 | 820 |
| 821 #ifndef WITHOUT_COMPLEX | |
| 822 case 'D': {/* complex double */ | 821 case 'D': {/* complex double */ |
| 823 Py_complex *p = va_arg(*p_va, Py_complex *); | 822 Py_complex *p = va_arg(*p_va, Py_complex *); |
| 824 Py_complex cval; | 823 Py_complex cval; |
| 825 cval = PyComplex_AsCComplex(arg); | 824 cval = PyComplex_AsCComplex(arg); |
| 826 if (PyErr_Occurred()) | 825 if (PyErr_Occurred()) |
| 827 return converterr("complex<D>", arg, msgbuf, bufsize); | 826 return converterr("complex<D>", arg, msgbuf, bufsize); |
| 828 else | 827 else |
| 829 *p = cval; | 828 *p = cval; |
| 830 break; | 829 break; |
| 831 } | 830 } |
| 832 #endif /* WITHOUT_COMPLEX */ | |
| 833 | 831 |
| 834 case 'c': {/* char */ | 832 case 'c': {/* char */ |
| 835 char *p = va_arg(*p_va, char *); | 833 char *p = va_arg(*p_va, char *); |
| 836 if (PyBytes_Check(arg) && PyBytes_Size(arg) == 1) | 834 if (PyBytes_Check(arg) && PyBytes_Size(arg) == 1) |
| 837 *p = PyBytes_AS_STRING(arg)[0]; | 835 *p = PyBytes_AS_STRING(arg)[0]; |
| 1770 case 'L': /* PY_LONG_LONG */ | 1768 case 'L': /* PY_LONG_LONG */ |
| 1771 case 'K': /* PY_LONG_LONG sized bitfield */ | 1769 case 'K': /* PY_LONG_LONG sized bitfield */ |
| 1772 #endif | 1770 #endif |
| 1773 case 'f': /* float */ | 1771 case 'f': /* float */ |
| 1774 case 'd': /* double */ | 1772 case 'd': /* double */ |
| 1775 #ifndef WITHOUT_COMPLEX | |
| 1776 case 'D': /* complex double */ | 1773 case 'D': /* complex double */ |
| 1777 #endif | |
| 1778 case 'c': /* char */ | 1774 case 'c': /* char */ |
| 1779 { | 1775 { |
| 1780 (void) va_arg(*p_va, void *); | 1776 (void) va_arg(*p_va, void *); |
| 1781 break; | 1777 break; |
| 1782 } | 1778 } |
