Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c342fca2
Commit
c342fca2
authored
Oct 18, 2010
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zipimport: fix indentation
parent
f038b32d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
Modules/zipimport.c
Modules/zipimport.c
+5
-4
No files found.
Modules/zipimport.c
View file @
c342fca2
...
...
@@ -41,6 +41,7 @@ struct _zipimporter {
};
static
PyObject
*
ZipImportError
;
/* read_directory() cache */
static
PyObject
*
zip_directory_cache
=
NULL
;
/* forward decls */
...
...
@@ -369,13 +370,13 @@ zipimporter_get_filename(PyObject *obj, PyObject *args)
if
(
!
PyArg_ParseTuple
(
args
,
"s:zipimporter.get_filename"
,
&
fullname
))
return
NULL
;
return
NULL
;
/* Deciding the filename requires working out where the code
would come from if the module was actually loaded */
code
=
get_module_code
(
self
,
fullname
,
&
ispackage
,
&
modpath
);
if
(
code
==
NULL
)
return
NULL
;
return
NULL
;
Py_DECREF
(
code
);
/* Only need the path info */
return
PyUnicode_FromString
(
modpath
);
...
...
@@ -677,7 +678,7 @@ get_long(unsigned char *buf) {
A toc_entry is a tuple:
(__file__, # value to use for __file__, available for all files
(__file__, # value to use for __file__, available for all files
compress, # compression kind; 0 for uncompressed
data_size, # size of compressed data on disk
file_size, # size of decompressed data
...
...
@@ -685,7 +686,7 @@ get_long(unsigned char *buf) {
time, # mod time of file (in dos format)
date, # mod data of file (in dos format)
crc, # crc checksum of the data
)
)
Directories can be recognized by the trailing SEP in the name,
data_size and file_offset are 0.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment