]> granicus.if.org Git - python/commitdiff
Py_complex; and WITHOUT_COMPLEX added to getargs.c
authorGuido van Rossum <guido@python.org>
Sun, 21 Jul 1996 02:27:43 +0000 (02:27 +0000)
committerGuido van Rossum <guido@python.org>
Sun, 21 Jul 1996 02:27:43 +0000 (02:27 +0000)
Python/bltinmodule.c
Python/compile.c
Python/getargs.c
Python/marshal.c

index 0eedb65e37c0cc4c702cb7abc2079bd345f61748..3a3fe56f5028182c9e554f757b3bdd0753c3191b 100644 (file)
@@ -286,7 +286,7 @@ builtin_complex(self, args)
 {
        object *r, *i;
        number_methods *nbr, *nbi;
-       complex cr, ci;
+       Py_complex cr, ci;
 
        i = NULL;
        if (!newgetargs(args, "O|O:complex", &r, &i))
index 3a1d3f68cf5900e5e08ecb66599f3a3c40e49a45..3299ad975747f90ef08a4ef14d504397c11af680 100644 (file)
@@ -565,7 +565,7 @@ parsenumber(s)
        char *end;
        long x;
 #ifndef WITHOUT_COMPLEX
-       complex c;
+       Py_complex c;
        int imflag;
 #endif
 
@@ -2500,7 +2500,7 @@ com_arglist(c, n)
                        name = STR(fp);
                else {
                        name = "";
-                       complex= 1;
+                       complex = 1;
                }
                com_newlocal(c, name);
                c->c_argcount++;
index 7ec31c353569f1c41599e457718112a5d4fbe4f8..0c47614a870ab9ee5d40cf340e1740e7f5c72f4b 100644 (file)
@@ -498,16 +498,18 @@ convertsimple1(arg, p_format, p_va)
                        break;
                }
        
+#ifndef WITHOUT_COMPLEX
        case 'D': /* complex double */
                {
-                       complex *p = va_arg(*p_va, complex *);
-                       complex cval = PyComplex_AsCComplex(arg);
+                       Py_complex *p = va_arg(*p_va, Py_complex *);
+                       Py_complex cval = PyComplex_AsCComplex(arg);
                        if (err_occurred())
                                return "complex<D>";
                        else
                                *p = cval;
                        break;
                }
+#endif /* WITHOUT_COMPLEX */
        
        case 'c': /* char */
                {
index 2fab46f070da4d56ce08585f8980d2db60aada70..509e303aa50311bbd1e83db1002599b764e67c4a 100644 (file)
@@ -359,7 +359,7 @@ r_object(p)
                {
                        extern double atof PROTO((const char *));
                        char buf[256];
-                       complex c;
+                       Py_complex c;
                        n = r_byte(p);
                        if (r_string(buf, (int)n, p) != n) {
                                err_setstr(EOFError,