]> granicus.if.org Git - python/commitdiff
Always use c2pstrcpy in stead of c2pstr, not only when compiling for carbon.
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 12 Jan 2001 23:36:13 +0000 (23:36 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 12 Jan 2001 23:36:13 +0000 (23:36 +0000)
Mac/Compat/getwd.c

index df96d42b936dd97b401d14a52ef2136c7a9c3f26..738d7563614f49b1c2868960c14877de6fdc3a8f 100644 (file)
@@ -53,12 +53,8 @@ getwd(char *cwd)
                sprintf(cwd, "I/O error %d in PBHGetVolSync", err);
                return NULL;
        }
-#if TARGET_API_MAC_CARBON
        p2cstrcpy(cwd, (StringPtr)cwd);
        ecwd = strchr(cwd, EOS);
-#else
-       ecwd= strchr((const char *)p2cstr((unsigned char*)cwd), EOS);
-#endif
        ebuf= buf;
        *ebuf = EOS;
        
@@ -77,12 +73,8 @@ getwd(char *cwd)
                                return NULL;
                        }
                        dirid= pb.d.ioDrParID;
-#if TARGET_API_MAC_CARBON
                        p2cstrcpy(ebuf, (StringPtr)ebuf);
                        ebuf += strlen(ebuf);
-#else
-                       ebuf += strlen((const char *)p2cstr((unsigned char *)ebuf));
-#endif
                        /* Should check for buf overflow */
                }
        }