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
33990568
Commit
33990568
authored
Feb 11, 2015
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Splitted the WFILE structure to WFILE and RFILE.
parent
b8918bf9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
Python/marshal.c
Python/marshal.c
+11
-6
No files found.
Python/marshal.c
View file @
33990568
...
...
@@ -65,15 +65,10 @@ typedef struct {
FILE
*
fp
;
int
error
;
/* see WFERR_* values */
int
depth
;
/* If fp == NULL, the following are valid: */
PyObject
*
readable
;
/* Stream-like object being read from */
PyObject
*
str
;
PyObject
*
current_filename
;
char
*
ptr
;
char
*
end
;
char
*
buf
;
Py_ssize_t
buf_size
;
PyObject
*
refs
;
/* dict on marshal, list on unmarshal */
_Py_hashtable_t
*
hashtable
;
int
version
;
}
WFILE
;
...
...
@@ -636,7 +631,17 @@ PyMarshal_WriteObjectToFile(PyObject *x, FILE *fp, int version)
w_flush
(
&
wf
);
}
typedef
WFILE
RFILE
;
/* Same struct with different invariants */
typedef
struct
{
FILE
*
fp
;
int
depth
;
PyObject
*
readable
;
/* Stream-like object being read from */
PyObject
*
current_filename
;
char
*
ptr
;
char
*
end
;
char
*
buf
;
Py_ssize_t
buf_size
;
PyObject
*
refs
;
/* a list */
}
RFILE
;
static
char
*
r_string
(
Py_ssize_t
n
,
RFILE
*
p
)
...
...
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