diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2008-06-13 07:47:47 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2008-06-13 07:47:47 (GMT) |
commit | 111c180674379950f65113db8076919b2353f5ab (patch) | |
tree | 3dd5a9985792d7c0f8e7fdc5f1b3df552d3d33fd | |
parent | e1f6646d6899a7dffe269e829b72c1b171eb7075 (diff) | |
download | cpython-111c180674379950f65113db8076919b2353f5ab.zip cpython-111c180674379950f65113db8076919b2353f5ab.tar.gz cpython-111c180674379950f65113db8076919b2353f5ab.tar.bz2 |
Make more symbols static.
-rw-r--r-- | Modules/_collectionsmodule.c | 10 | ||||
-rw-r--r-- | Modules/_localemodule.c | 2 | ||||
-rw-r--r-- | Modules/_tkinter.c | 4 | ||||
-rw-r--r-- | Modules/arraymodule.c | 2 | ||||
-rw-r--r-- | Modules/unicodedata_db.h | 4 | ||||
-rw-r--r-- | Tools/unicode/makeunicodedata.py | 4 |
6 files changed, 13 insertions, 13 deletions
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index 67700de..4d13e45 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -85,7 +85,7 @@ newblock(block *leftlink, block *rightlink, int len) { return b; } -void +static void freeblock(block *b) { if (numfreeblocks < MAXFREEBLOCKS) { @@ -957,7 +957,7 @@ typedef struct { int counter; /* number of items remaining for iteration */ } dequeiterobject; -PyTypeObject dequeiter_type; +static PyTypeObject dequeiter_type; static PyObject * deque_iter(dequeobject *deque) @@ -1024,7 +1024,7 @@ static PyMethodDef dequeiter_methods[] = { {NULL, NULL} /* sentinel */ }; -PyTypeObject dequeiter_type = { +static PyTypeObject dequeiter_type = { PyVarObject_HEAD_INIT(NULL, 0) "deque_iterator", /* tp_name */ sizeof(dequeiterobject), /* tp_basicsize */ @@ -1059,7 +1059,7 @@ PyTypeObject dequeiter_type = { /*********************** Deque Reverse Iterator **************************/ -PyTypeObject dequereviter_type; +static PyTypeObject dequereviter_type; static PyObject * deque_reviter(dequeobject *deque) @@ -1106,7 +1106,7 @@ dequereviter_next(dequeiterobject *it) return item; } -PyTypeObject dequereviter_type = { +static PyTypeObject dequereviter_type = { PyVarObject_HEAD_INIT(NULL, 0) "deque_reverse_iterator", /* tp_name */ sizeof(dequeiterobject), /* tp_basicsize */ diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c index 02e9e53..09e04ef 100644 --- a/Modules/_localemodule.c +++ b/Modules/_localemodule.c @@ -444,7 +444,7 @@ PyLocale_getdefaultlocale(PyObject* self) #ifdef HAVE_LANGINFO_H #define LANGINFO(X) {#X, X} -struct langinfo_constant{ +static struct langinfo_constant{ char* name; int value; } langinfo_constants[] = diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index 4308773..f101450 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -490,7 +490,7 @@ Split(char *list) lists. SplitObj walks through a nested tuple, finding string objects that need to be split. */ -PyObject * +static PyObject * SplitObj(PyObject *arg) { if (PyTuple_Check(arg)) { @@ -1523,7 +1523,7 @@ varname_converter(PyObject *in, void *_out) return 0; } -void +static void var_perform(VarEvent *ev) { *(ev->res) = ev->func(ev->self, ev->args, ev->flags); diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index 5d10001..99d25d3 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -1546,7 +1546,7 @@ static PyGetSetDef array_getsets [] = { {NULL} }; -PyMethodDef array_methods[] = { +static PyMethodDef array_methods[] = { {"append", (PyCFunction)array_append, METH_O, append_doc}, {"buffer_info", (PyCFunction)array_buffer_info, METH_NOARGS, diff --git a/Modules/unicodedata_db.h b/Modules/unicodedata_db.h index d68466a..f56e446 100644 --- a/Modules/unicodedata_db.h +++ b/Modules/unicodedata_db.h @@ -228,7 +228,7 @@ const _PyUnicode_DatabaseRecord _PyUnicode_Database_Records[] = { #define TOTAL_FIRST 356 #define TOTAL_LAST 53 struct reindex{int start;short count,index;}; -struct reindex nfc_first[] = { +static struct reindex nfc_first[] = { { 60, 2, 0}, { 65, 15, 3}, { 82, 8, 19}, @@ -425,7 +425,7 @@ struct reindex nfc_first[] = { {0,0,0} }; -struct reindex nfc_last[] = { +static struct reindex nfc_last[] = { { 768, 4, 0}, { 774, 6, 5}, { 783, 0, 12}, diff --git a/Tools/unicode/makeunicodedata.py b/Tools/unicode/makeunicodedata.py index 9de6904..2dfaa29 100644 --- a/Tools/unicode/makeunicodedata.py +++ b/Tools/unicode/makeunicodedata.py @@ -229,12 +229,12 @@ def makeunicodedata(unicode, trace): print >>fp, "#define TOTAL_FIRST",total_first print >>fp, "#define TOTAL_LAST",total_last print >>fp, "struct reindex{int start;short count,index;};" - print >>fp, "struct reindex nfc_first[] = {" + print >>fp, "static struct reindex nfc_first[] = {" for start,end in comp_first_ranges: print >>fp," { %d, %d, %d}," % (start,end-start,comp_first[start]) print >>fp," {0,0,0}" print >>fp,"};\n" - print >>fp, "struct reindex nfc_last[] = {" + print >>fp, "static struct reindex nfc_last[] = {" for start,end in comp_last_ranges: print >>fp," { %d, %d, %d}," % (start,end-start,comp_last[start]) print >>fp," {0,0,0}" |