- 13 Agu, 2006 1 kayıt (commit)
-
-
Neal Norwitz yazdı
Klocwork 281
-
- 12 Agu, 2006 1 kayıt (commit)
-
-
Neal Norwitz yazdı
There might be something else that needs to be done to setup the error. Klocwork #295.
-
- 12 Haz, 2006 1 kayıt (commit)
-
-
Neal Norwitz yazdı
-
- 06 Haz, 2006 1 kayıt (commit)
-
-
Andrew M. Kuchling yazdı
-
- 02 Haz, 2006 1 kayıt (commit)
-
-
Neal Norwitz yazdı
Prevent an invalid memory read from test_coding in case the done flag is set. In that case, the loop isn't entered. I wonder if rather than setting the done flag in the cases before the loop, if they should just exit early. This code looks like it should be refactored. Backport candidate (also the early break above if decoding_fgets fails)
-
- 04 May, 2006 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
- 18 Nis, 2006 1 kayıt (commit)
-
-
Skip Montanaro yazdı
-
- 14 Nis, 2006 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
independently. Fixes #1355883.
-
- 13 Nis, 2006 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
- 11 Nis, 2006 4 kayıt (commit)
-
-
Anthony Baxter yazdı
entirely happy with the two new VISIT macros in compile.c, but I couldn't see a better approach.
-
Neal Norwitz yazdı
mismatches. At least I hope this fixes them all. This reverts part of my change from yesterday that converted everything in Parser/*.c to use PyObject_* API. The encoding doesn't really need to use PyMem_*, however, it uses new_string() which must return PyMem_* for handling the result of PyOS_Readline() which returns PyMem_* memory. If there were 2 versions of new_string() one that returned PyMem_* for tokens and one that return PyObject_* for encodings that could also fix this problem. I'm not sure which version would be clearer. This seems to fix both Guido's and Phillip's problems, so it's good enough for now. After this change, it would be good to review Parser/*.c for consistent use of the 2 memory APIs.
-
Martin v. Löwis yazdı
Explicitly cast void* to int to cmpop_ty.
-
Anthony Baxter yazdı
malloc/realloc type functions, as well as renaming one variable called 'new' in tokensizer.c. Still lots more to be done, going to be checking in one chunk at a time or the patch will be massively huge. Still compiles ok with gcc.
-
- 10 Nis, 2006 1 kayıt (commit)
-
-
Neal Norwitz yazdı
This was the result of inconsistent use of PyMem_* and PyObject_* allocators. By changing to use PyObject_* allocator almost everywhere, this removes the inconsistency.
-
- 04 Nis, 2006 2 kayıt (commit)
-
-
Jeremy Hylton yazdı
-
Jeremy Hylton yazdı
tracing/line number table in except blocks. Reflow long lines introduced by col_offset changes. Update test_ast to handle new fields in excepthandler. As note in Python.asdl says, we might want to rethink how attributes are handled. Perhaps they should be the same as other fields, with the primary difference being how they are defined for all types within a sum. Also fix asdl_c so that constructors with int fields don't fail when passed a zero value.
-
- 03 Nis, 2006 1 kayıt (commit)
-
-
Neal Norwitz yazdı
* Cleanup formatting a bit (add spaces). * Move static var initialized inside init_types() since that's the only place it's used.
-
- 26 Mar, 2006 1 kayıt (commit)
-
-
Tim Peters yazdı
objimpl.h, pymem.h: Stop mapping PyMem_{Del, DEL} and PyMem_{Free, FREE} to PyObject_{Free, FREE} in a release build. They're aliases for the system free() now. _subprocess.c/sp_handle_dealloc(): Since the memory was originally obtained via PyObject_NEW, it must be released via PyObject_FREE (or _DEL). pythonrun.c, tokenizer.c, parsermodule.c: I lost count of the number of PyObject vs PyMem mismatches in these -- it's like the specific function called at each site was picked at random, sometimes even with memory obtained via PyMem getting released via PyObject. Changed most to use PyObject uniformly, since the blobs allocated are predictably small in most cases, and obmalloc is generally faster than system mallocs then. If extension modules in real life prove as sloppy as Python's front end, we'll have to revert the objimpl.h + pymem.h part of this patch. Note that no problems will show up in a debug build (all calls still go thru obmalloc then). Problems will show up only in a release build, most likely segfaults.
-
- 20 Mar, 2006 1 kayıt (commit)
-
-
Neal Norwitz yazdı
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.
-
- 07 Mar, 2006 1 kayıt (commit)
-
-
Hye-Shik Chang yazdı
(reviewed by Neal Norwitz)
-
- 02 Mar, 2006 2 kayıt (commit)
-
-
Thomas Wouters yazdı
but without a specified encoding: decoding_fgets() (and decoding_feof()) can return NULL and fiddle with the 'tok' struct, making tok->buf NULL. This is okay in the other cases of calls to decoding_*(), it seems, but not in this one. This should get a test added, somewhere, but the testsuite doesn't seem to test encoding anywhere (although plenty of tests use it.) It seems to me that decoding errors in other places in the code (like at the start of a token, instead of in the middle of one) make the code end up adding small integers to NULL pointers, but happen to check for error states before using the calculated new pointers. I haven't been able to trigger any other crashes, in any case. I would nominate this file for a comlete rewrite for Py3k. The whole decoding trick is too bolted-on for my tastes.
-
Martin v. Löwis yazdı
-
- 01 Mar, 2006 2 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
Martin v. Löwis yazdı
-
- 28 Şub, 2006 9 kayıt (commit)
-
-
Neal Norwitz yazdı
-
Thomas Wouters yazdı
actually necessary for functionality, but good for transition.
-
Martin v. Löwis yazdı
-
Thomas Wouters yazdı
Neal.
-
Tim Peters yazdı
-
Thomas Wouters yazdı
- IMPORT_NAME takes an extra argument from the stack: the relativeness of the import. Only passed to __import__ when it's not -1. - __import__() takes an optional 5th argument for the same thing; it __defaults to -1 (old semantics: try relative, then absolute) - 'from . import name' imports name (be it module or regular attribute) from the current module's *package*. Likewise, 'from .module import name' will import name from a sibling to the current module. - Importing from outside a package is not allowed; 'from . import sys' in a toplevel module will not work, nor will 'from .. import sys' in a (single-level) package. - 'from __future__ import absolute_import' will turn on the new semantics for import and from-import: imports will be absolute, except for from-import with dots. Includes tests for regular imports and importhooks, parser changes and a NEWS item, but no compiler-package changes or documentation changes.
-
Martin v. Löwis yazdı
-
Martin v. Löwis yazdı
-
Martin v. Löwis yazdı
-
- 27 Şub, 2006 4 kayıt (commit)
-
-
Guido van Rossum yazdı
This was started by Mike Bland and completed by Guido (with help from Neal). This still needs a __future__ statement added; Thomas is working on Michael's patch for that aspect. There's a small amount of code cleanup and refactoring in ast.c, compile.c and ceval.c (I fixed the lltrace behavior when EXT_POP is used -- however I had to make lltrace a static global).
-
Martin v. Löwis yazdı
Cleanup Python-ast.c generation.
-
Thomas Wouters yazdı
breaks the parser module, because it adds the if/else construct as well as two new grammar rules for backward compatibility. If no one else fixes parsermodule, I guess I'll go ahead and fix it later this week. The TeX code was checked with texcheck.py, but not rendered. There is actually a slight incompatibility: >>> (x for x in lambda:0) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: iteration over non-sequence changes into >>> (x for x in lambda: 0) File "<stdin>", line 1 (x for x in lambda: 0) ^ SyntaxError: invalid syntax Since there's no way the former version can be useful, it's probably a bugfix ;)
-
Martin v. Löwis yazdı
-
- 26 Şub, 2006 3 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
Martin v. Löwis yazdı
-
Martin v. Löwis yazdı
a tree of Python objects. Expose this through compile().
-