Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f68d8e5

Browse files
committed
Make some private symbols static.
1 parent f85af61 commit f68d8e5

5 files changed

Lines changed: 8 additions & 7 deletions

File tree

Modules/posixmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3836,7 +3836,7 @@ static char posix_strerror__doc__[] =
38363836
"strerror(code) -> string\n\
38373837
Translate an error code to a message string.";
38383838

3839-
PyObject *
3839+
static PyObject *
38403840
posix_strerror(PyObject *self, PyObject *args)
38413841
{
38423842
int code;

Objects/fileobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ typedef off_t Py_off_t;
222222

223223
/* a portable fseek() function
224224
return 0 on success, non-zero on failure (with errno set) */
225-
int
225+
static int
226226
_portable_fseek(FILE *fp, Py_off_t offset, int whence)
227227
{
228228
#if defined(HAVE_FSEEKO)
@@ -257,7 +257,7 @@ _portable_fseek(FILE *fp, Py_off_t offset, int whence)
257257
/* a portable ftell() function
258258
Return -1 on failure with errno set appropriately, current file
259259
position on success */
260-
Py_off_t
260+
static Py_off_t
261261
_portable_ftell(FILE* fp)
262262
{
263263
#if SIZEOF_FPOS_T >= 8 && defined(HAVE_LARGEFILE_SUPPORT)

Objects/frameobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ PyFrame_BlockPop(PyFrameObject *f)
251251

252252
/* Convert between "fast" version of locals and dictionary version */
253253

254-
void
254+
static void
255255
map_to_dict(PyObject *map, int nmap, PyObject *dict, PyObject **values,
256256
int deref)
257257
{

Python/compile.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,8 @@ struct compiling {
374374
PyFutureFeatures *c_future; /* pointer to module's __future__ */
375375
};
376376

377-
int is_free(int v)
377+
static int
378+
is_free(int v)
378379
{
379380
if ((v & (USE | DEF_FREE))
380381
&& !(v & (DEF_LOCAL | DEF_PARAM | DEF_GLOBAL)))

Python/exceptions.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ SystemExit__init__(PyObject *self, PyObject *args)
420420
}
421421

422422

423-
PyMethodDef SystemExit_methods[] = {
423+
static PyMethodDef SystemExit_methods[] = {
424424
{ "__init__", SystemExit__init__, METH_VARARGS},
425425
{NULL, NULL}
426426
};
@@ -836,7 +836,7 @@ SyntaxError__str__(PyObject *self, PyObject *args)
836836
}
837837

838838

839-
PyMethodDef SyntaxError_methods[] = {
839+
static PyMethodDef SyntaxError_methods[] = {
840840
{"__init__", SyntaxError__init__, METH_VARARGS},
841841
{"__str__", SyntaxError__str__, METH_VARARGS},
842842
{NULL, NULL}

0 commit comments

Comments
 (0)