diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-20 01:53:23 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-20 01:53:23 (GMT) |
commit | 2aa9a5dfdd2966c57036dc836ba8e91ad47ecf14 (patch) | |
tree | 49688fd8e420b9a1625345de6593e147523b7b66 /Objects/frameobject.c | |
parent | 70f05c5d7f0259d056dbb19bc5632c8357fd6998 (diff) | |
download | cpython-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 'Objects/frameobject.c')
-rw-r--r-- | Objects/frameobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 6e3f297..8aa3377 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -749,7 +749,7 @@ PyFrame_FastToLocals(PyFrameObject *f) return; PyErr_Fetch(&error_type, &error_value, &error_traceback); fast = f->f_localsplus; - j = PyTuple_Size(map); + j = PyTuple_GET_SIZE(map); if (j > f->f_nlocals) j = f->f_nlocals; if (f->f_nlocals) @@ -787,7 +787,7 @@ PyFrame_LocalsToFast(PyFrameObject *f, int clear) return; PyErr_Fetch(&error_type, &error_value, &error_traceback); fast = f->f_localsplus; - j = PyTuple_Size(map); + j = PyTuple_GET_SIZE(map); if (j > f->f_nlocals) j = f->f_nlocals; if (f->f_nlocals) |