summaryrefslogtreecommitdiffstats
path: root/Python/traceback.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-03-20 01:53:23 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-03-20 01:53:23 (GMT)
commit2aa9a5dfdd2966c57036dc836ba8e91ad47ecf14 (patch)
tree49688fd8e420b9a1625345de6593e147523b7b66 /Python/traceback.c
parent70f05c5d7f0259d056dbb19bc5632c8357fd6998 (diff)
downloadcpython-2aa9a5dfdd2966c57036dc836ba8e91ad47ecf14.zip
cpython-2aa9a5dfdd2966c57036dc836ba8e91ad47ecf14.tar.gz
cpython-2aa9a5dfdd2966c57036dc836ba8e91ad47ecf14.tar.bz2
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.
Diffstat (limited to 'Python/traceback.c')
-rw-r--r--Python/traceback.c2
1 files changed, 1 insertions, 1 deletions
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 @@ 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));