summaryrefslogtreecommitdiffstats
path: root/Modules/zipimport.c
Commit message (Collapse)AuthorAgeFilesLines
* Coverity issue CID #197Christian Heimes2008-01-181-0/+2
| | | | | var_decl: Declared variable "stm" without initializer ninit_use_in_call: Using uninitialized value "stm" (field "stm".tm_zone uninitialized) in call to function "mktime"
* Modified PyImport_Import and PyImport_ImportModule to always use absolute ↵Christian Heimes2008-01-031-1/+1
| | | | | | imports by calling __import__ with an explicit level of 0 Added a new API function PyImport_ImportModuleNoBlock. It solves the problem with dead locks when mixing threads and imports
* #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and ↵Christian Heimes2007-12-191-1/+1
| | | | Py_REFCNT. Macros for b/w compatibility are available.
* PEP 3123: Provide forward compatibility with Python 3.0, while keepingMartin v. Löwis2007-07-211-3/+2
| | | | | backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
* It's very unlikely, though possible that source is not a string. VerifyNeal Norwitz2006-08-131-0/+3
| | | | | | | that PyString_AsString() returns a valid pointer. (The problem can arise when zlib.decompress doesn't return a string.) Klocwork 346
* Use Py_VISIT in all tp_traverse methods, instead of traversing manually orThomas Wouters2006-04-151-7/+1
| | | | | | | | using a custom, nearly-identical macro. This probably changes how some of these functions are compiled, which may result in fractionally slower (or faster) execution. Considering the nature of traversal, visiting much of the address space in unpredictable patterns, I'd argue the code readability and maintainability is well worth it ;P
* remove forward declarations. No constructors to move for these files. MakesAnthony Baxter2006-04-121-2/+1
| | | | code work with C++ compilers.
* SF #1444030: Fix several potential defects found by Coverity.Hye-Shik Chang2006-03-071-0/+2
| | | | (reviewed by Neal Norwitz)
* Patch #1352711: make zipimport raise a complete IOErrorGeorg Brandl2006-02-191-2/+1
|
* Use Py_ssize_t for counts and sizes.Martin v. Löwis2006-02-161-2/+2
|
* Merge ssize_t branch.Martin v. Löwis2006-02-151-2/+4
|
* the implementation uses ZipImportError, not ZipImporterError...Fredrik Lundh2006-01-151-1/+1
|
* Fix icc warnings: strlen() returns size_tNeal Norwitz2006-01-081-4/+5
|
* update busted commentFred Drake2005-11-111-1/+2
|
* Fix a bunch of imports to use code.h instead of compile.h.Jeremy Hylton2005-10-211-1/+0
| | | | Remove duplicate declarations from compile.h
* Disallow keyword arguments for type constructors that don't use them.Georg Brandl2005-08-261-0/+3
| | | | (fixes bug #1119418)
* SF patch 1062495: Modules/zipimport.c does not compile on solarisRaymond Hettinger2004-11-101-5/+5
| | | | | | (Contributed by Niki W. Waibel.) Simple renaming to avoid a conflict that prevented compilation on Solaris.
* Patch #801349: 64-bit fix for AMD64 from Gwenole Beauchesne.Just van Rossum2003-09-071-1/+1
| | | | | Classical problem with int vs. long mismatch in varargs. 2.3 backport candidate.
* Change the zipimport implementation to accept files containingThomas Heller2003-07-221-2/+7
| | | | | | | | | arbitrary bytes before the actual zip compatible archive. Zipfiles containing comments at the end of the file are still not supported. Add a testcase to test_zipimport, and update NEWS. This closes sf #775637 and sf #669036.
* Remove unused variable.Jeremy Hylton2003-07-171-2/+1
|
* Patch #734231: Update RiscOS support. In particular, correctMartin v. Löwis2003-05-101-0/+10
| | | | riscospath.extsep, and use os.extsep throughout.
* tentative fix for #712322: modification time stamp checking failedJust van Rossum2003-04-081-1/+1
| | | | when DST began.
* Make private function and data static.Neal Norwitz2003-03-231-2/+3
|
* use proper constant instead of comment (noted by nnorwitz)Just van Rossum2003-02-281-1/+1
|
* Fix 64-bit problem, ParseTuple("i") needs C ints; ("l") needs C longs.Neal Norwitz2003-02-181-1/+1
| | | | | Use "l" as that *probably* makes more sense (at least to me it does :-) And the test passes on the alpha.
* Use correct function name to PyArg_ParseTuple("is_package").Neal Norwitz2003-02-171-5/+2
| | | | | | | | | | | | Fix off-by-1 error in normalize_line_endings(): when *p == '\0' the NUL was copied into q and q was auto-incremented, the loop was broken out of, then a newline was appended followed by a NUL. So the function, in effect, was strcpy() but added two extra chars which was caught by obmalloc in debug mode, since there was only room for 1 additional newline. Get test working under regrtest (added test_main).
* Fix for bug #661136Just van Rossum2003-01-031-12/+14
| | | | | | | | | | | | | Lesson learned: kids should not be allowed to use API's starting with an underscore :-/ zipimport in 2.3a1 is even more broken than I thought: I attemped to _PyString_Resize a string created by PyString_FromStringAndSize, which fails for strings with length 0 or 1 since the latter returns an interned string in those cases. This would cause a SystemError with empty source files (and no matching pyc) in the zip archive. I rewrote the offending code to simply allocate a new buffer and avoid _PyString_Resize altogether. Added a test that would've caught the problem.
* Ugh, zipimport is virtually broken in 2.3a1 :-( It worked by accident inJust van Rossum2003-01-021-1/+1
| | | | | | | | | | | | | the test set as it only tested with a zip archive in the current directory, but it doesn't work at all for packages when the zip archive was specified as an absolute path. It's a real embarrassing bug: a strchr call should have been strrchr; fever apparently implies dyslexia. Second stupid bug: the zipimport test failed with a name error __importer__ (which I had renamed to __loader__ everywhere but here). I would've sworn I ran the test after that change but that can't be true. What I don't understand that noone reported a failing test_zipimport.py before the release of 2.3a1.
* removed unused get_short() functionJust van Rossum2002-12-311-14/+0
|
* - added missing decrefJust van Rossum2002-12-311-4/+5
| | | | - whitespace normalization
* Added casts to forestall warnings with MetroWerks.Jack Jansen2002-12-301-4/+4
|
* Squashed compiler wng from MSVC6.Tim Peters2002-12-301-1/+1
|
* Wouldn't compile on Windows; fixed.Tim Peters2002-12-301-1/+1
|
* PEP 302 + zipimport:Just van Rossum2002-12-301-0/+1187
- new import hooks in import.c, exposed in the sys module - new module called 'zipimport' - various changes to allow bootstrapping from zip files I hope I didn't break the Windows build (or anything else for that matter), but then again, it's been sitting on sf long enough... Regarding the latest discussions on python-dev: zipimport sets pkg.__path__ as specified in PEP 273, and likewise, sys.path item such as /path/to/Archive.zip/subdir/ are supported again.