mirror of
https://github.com/python/cpython.git
synced 2025-09-13 20:27:05 +00:00
Always use c2pstrcpy in stead of c2pstr, not only when compiling for carbon.
This commit is contained in:
parent
1beb3d204f
commit
bef8f68d84
1 changed files with 0 additions and 8 deletions
|
@ -53,12 +53,8 @@ getwd(char *cwd)
|
||||||
sprintf(cwd, "I/O error %d in PBHGetVolSync", err);
|
sprintf(cwd, "I/O error %d in PBHGetVolSync", err);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#if TARGET_API_MAC_CARBON
|
|
||||||
p2cstrcpy(cwd, (StringPtr)cwd);
|
p2cstrcpy(cwd, (StringPtr)cwd);
|
||||||
ecwd = strchr(cwd, EOS);
|
ecwd = strchr(cwd, EOS);
|
||||||
#else
|
|
||||||
ecwd= strchr((const char *)p2cstr((unsigned char*)cwd), EOS);
|
|
||||||
#endif
|
|
||||||
ebuf= buf;
|
ebuf= buf;
|
||||||
*ebuf = EOS;
|
*ebuf = EOS;
|
||||||
|
|
||||||
|
@ -77,12 +73,8 @@ getwd(char *cwd)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
dirid= pb.d.ioDrParID;
|
dirid= pb.d.ioDrParID;
|
||||||
#if TARGET_API_MAC_CARBON
|
|
||||||
p2cstrcpy(ebuf, (StringPtr)ebuf);
|
p2cstrcpy(ebuf, (StringPtr)ebuf);
|
||||||
ebuf += strlen(ebuf);
|
ebuf += strlen(ebuf);
|
||||||
#else
|
|
||||||
ebuf += strlen((const char *)p2cstr((unsigned char *)ebuf));
|
|
||||||
#endif
|
|
||||||
/* Should check for buf overflow */
|
/* Should check for buf overflow */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue