summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/import.c4
-rw-r--r--Python/traceback.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/Python/import.c b/Python/import.c
index 73051a2060..e58dbd5a1b 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1216,12 +1216,12 @@ find_module(char *fullname, char *subname, PyObject *path, char *buf,
#endif
if (!PyString_Check(v))
continue;
- len = PyString_Size(v);
+ len = PyString_GET_SIZE(v);
if (len + 2 + namelen + MAXSUFFIXSIZE >= buflen) {
Py_XDECREF(copy);
continue; /* Too long */
}
- strcpy(buf, PyString_AsString(v));
+ strcpy(buf, PyString_AS_STRING(v));
if (strlen(buf) != len) {
Py_XDECREF(copy);
continue; /* v contains '\0' */
diff --git a/Python/traceback.c b/Python/traceback.c
index 6c11cf5274..567f23d990 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -165,7 +165,7 @@ tb_displayline(PyObject *f, char *filename, int lineno, char *name)
}
if (PyString_Check(v)) {
size_t len;
- len = PyString_Size(v);
+ len = PyString_GET_SIZE(v);
if (len + 1 + taillen >= MAXPATHLEN)
continue; /* Too long */
strcpy(namebuf, PyString_AsString(v));