From f68d8e52e7ce833d123de034a4f123ec710a639f Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 14 Apr 2001 17:55:09 +0000 Subject: Make some private symbols static. --- Modules/posixmodule.c | 2 +- Objects/fileobject.c | 4 ++-- Objects/frameobject.c | 2 +- Python/compile.c | 3 ++- Python/exceptions.c | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 5575b9f..cb8a1d1 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -3836,7 +3836,7 @@ static char posix_strerror__doc__[] = "strerror(code) -> string\n\ Translate an error code to a message string."; -PyObject * +static PyObject * posix_strerror(PyObject *self, PyObject *args) { int code; diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 27e21de..9af03b7 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -222,7 +222,7 @@ typedef off_t Py_off_t; /* a portable fseek() function return 0 on success, non-zero on failure (with errno set) */ -int +static int _portable_fseek(FILE *fp, Py_off_t offset, int whence) { #if defined(HAVE_FSEEKO) @@ -257,7 +257,7 @@ _portable_fseek(FILE *fp, Py_off_t offset, int whence) /* a portable ftell() function Return -1 on failure with errno set appropriately, current file position on success */ -Py_off_t +static Py_off_t _portable_ftell(FILE* fp) { #if SIZEOF_FPOS_T >= 8 && defined(HAVE_LARGEFILE_SUPPORT) diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 74e7012..64d166c 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -251,7 +251,7 @@ PyFrame_BlockPop(PyFrameObject *f) /* Convert between "fast" version of locals and dictionary version */ -void +static void map_to_dict(PyObject *map, int nmap, PyObject *dict, PyObject **values, int deref) { diff --git a/Python/compile.c b/Python/compile.c index 1fb85e7..0939f05 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -374,7 +374,8 @@ struct compiling { PyFutureFeatures *c_future; /* pointer to module's __future__ */ }; -int is_free(int v) +static int +is_free(int v) { if ((v & (USE | DEF_FREE)) && !(v & (DEF_LOCAL | DEF_PARAM | DEF_GLOBAL))) diff --git a/Python/exceptions.c b/Python/exceptions.c index f262ef2..ad8021e 100644 --- a/Python/exceptions.c +++ b/Python/exceptions.c @@ -420,7 +420,7 @@ SystemExit__init__(PyObject *self, PyObject *args) } -PyMethodDef SystemExit_methods[] = { +static PyMethodDef SystemExit_methods[] = { { "__init__", SystemExit__init__, METH_VARARGS}, {NULL, NULL} }; @@ -836,7 +836,7 @@ SyntaxError__str__(PyObject *self, PyObject *args) } -PyMethodDef SyntaxError_methods[] = { +static PyMethodDef SyntaxError_methods[] = { {"__init__", SyntaxError__init__, METH_VARARGS}, {"__str__", SyntaxError__str__, METH_VARARGS}, {NULL, NULL} -- cgit v0.12