1. 27 Oct, 2001 5 commits
    • Tim Peters's avatar
      vgetargskeywords: · 28bf7a97
      Tim Peters authored
      + Removed now-redundant tuple typecheck.
      + Renamed "tplen" local to "argslen" (it's the length of the "args"
        argument; I suppose "tp" was for "Tim Peters should rename me
        someday <wink>).
      28bf7a97
    • Tim Peters's avatar
      PyArg_ParseTupleAndKeywords: return false on internal error, not -1 (I · f8cd3e86
      Tim Peters authored
      introduced this bug just a little while ago, when *adding* internal error
      checks).
      
      vgetargskeywords:  Rewrote the section that crawls over the format string.
      + Added block comment so it won't take the next person 15 minutes to
        reverse-engineer what it's doing.
      + Lined up the "else" clauses.
      + Rearranged the ifs in decreasing order of likelihood (for speed).
      f8cd3e86
    • Tim Peters's avatar
      PyArg_ParseTupleAndKeywords: do basic sanity checks on the arguments, · 45772cde
      Tim Peters authored
      and raise an error if they're insane.
      vgetargskeywords:  the same, except that since this is an internal routine,
      just assert that the arguments are sane.
      45772cde
    • Tim Peters's avatar
      tuple(3,4,5,x=2) dumped core on my box. vgetargskeywords() overindexed · a9f4739a
      Tim Peters authored
      the kwlist vector whenever there was a mix of positional and keyword
      arguments, and the number of positional arguments exceeded the length
      of the kwlist vector.  If there was just one more positional arg than
      keyword, the kwlist-terminating NULL got passed to PyMapping_HasKeyString,
      which set an internal error that vgetargskeywords() then squashed (but
      it's impossible to say whether it knew it was masking an error).  If
      more than one more positional argument, it went on to pass random trash
      to PyMapping_HasKeyString, which is why the example at the start
      happened to kill the process.
      
      Pure bugfix candidate.
      a9f4739a
    • Tim Peters's avatar
      vgetargskeywords(): remove test that can't succeed. Not a bugfix, just · f4331c1c
      Tim Peters authored
      removing useless obfuscation.
      f4331c1c
  2. 26 Oct, 2001 32 commits
  3. 25 Oct, 2001 3 commits