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
6dc01e1e
Commit
6dc01e1e
authored
Aug 06, 2002
by
Neal Norwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make readahead functions static
parent
ff8158b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
Objects/fileobject.c
Objects/fileobject.c
+8
-5
No files found.
Objects/fileobject.c
View file @
6dc01e1e
...
@@ -271,7 +271,7 @@ err_closed(void)
...
@@ -271,7 +271,7 @@ err_closed(void)
return
NULL
;
return
NULL
;
}
}
void
drop_readahead
(
PyFileObject
*
);
static
void
drop_readahead
(
PyFileObject
*
);
/* Methods */
/* Methods */
...
@@ -1608,7 +1608,7 @@ static PyGetSetDef file_getsetlist[] = {
...
@@ -1608,7 +1608,7 @@ static PyGetSetDef file_getsetlist[] = {
{
0
},
{
0
},
};
};
void
static
void
drop_readahead
(
PyFileObject
*
f
)
drop_readahead
(
PyFileObject
*
f
)
{
{
if
(
f
->
f_buf
!=
NULL
)
{
if
(
f
->
f_buf
!=
NULL
)
{
...
@@ -1620,7 +1620,9 @@ drop_readahead(PyFileObject *f)
...
@@ -1620,7 +1620,9 @@ drop_readahead(PyFileObject *f)
/* Make sure that file has a readahead buffer with at least one byte
/* Make sure that file has a readahead buffer with at least one byte
(unless at EOF) and no more than bufsize. Returns negative value on
(unless at EOF) and no more than bufsize. Returns negative value on
error */
error */
int
readahead
(
PyFileObject
*
f
,
int
bufsize
)
{
static
int
readahead
(
PyFileObject
*
f
,
int
bufsize
)
{
int
chunksize
;
int
chunksize
;
if
(
f
->
f_buf
!=
NULL
)
{
if
(
f
->
f_buf
!=
NULL
)
{
...
@@ -1655,8 +1657,9 @@ int readahead(PyFileObject *f, int bufsize) {
...
@@ -1655,8 +1657,9 @@ int readahead(PyFileObject *f, int bufsize) {
horrified by the recursive call: maximum recursion depth is limited by
horrified by the recursive call: maximum recursion depth is limited by
logarithmic buffer growth to about 50 even when reading a 1gb line. */
logarithmic buffer growth to about 50 even when reading a 1gb line. */
PyStringObject
*
static
PyStringObject
*
readahead_get_line_skip
(
PyFileObject
*
f
,
int
skip
,
int
bufsize
)
{
readahead_get_line_skip
(
PyFileObject
*
f
,
int
skip
,
int
bufsize
)
{
PyStringObject
*
s
;
PyStringObject
*
s
;
char
*
bufptr
;
char
*
bufptr
;
char
*
buf
;
char
*
buf
;
...
...
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