Use macro versions instead of function versions when we already know the type.
This will hopefully get rid of some Coverity warnings, be a hint to
developers, and be marginally faster.
Some asserts were added when the type is currently known, but depends
on values from another function.
diff --git a/Python/traceback.c b/Python/traceback.c
index 6c11cf5..567f23d 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -165,7 +165,7 @@
}
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));