diff Python/traceback.c @ 37086:3b7b295cca90 legacy-trunk

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.
author Neal Norwitz <nnorwitz@gmail.com>
date Mon, 20 Mar 2006 01:53:23 +0000
parents e9a7a2784e17
children d1547426ab61
line wrap: on
line diff
--- a/Python/traceback.c	Sun Mar 19 20:40:05 2006 +0000
+++ b/Python/traceback.c	Mon Mar 20 01:53:23 2006 +0000
@@ -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));