Commit ba5a13f9 authored by Jack Jansen's avatar Jack Jansen

Added a c2pstrcpy() function.

parent 88d3b859
......@@ -345,6 +345,17 @@ Pstring(char *str)
return buf;
}
void
c2pstrcpy(unsigned char *dst, const char *src)
{
int len;
len = strlen(src);
if ( len > 255 ) len = 255;
strncpy((char *)dst+1, src, len);
dst[0] = len;
}
/* Like strerror() but for Mac OS error numbers */
char *PyMac_StrError(int err)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment