diff options
author | Georg Brandl <georg@python.org> | 2008-05-26 10:29:35 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-05-26 10:29:35 (GMT) |
commit | 0a7ac7d70d370544c6a9d118bbbd6886ad4f5ce5 (patch) | |
tree | ec61fd6d53e6425b8639567860140c724ea7bc63 /Modules | |
parent | e6f00637be87c8f5f0e50bf317d684ea421a6d19 (diff) | |
download | cpython-0a7ac7d70d370544c6a9d118bbbd6886ad4f5ce5.zip cpython-0a7ac7d70d370544c6a9d118bbbd6886ad4f5ce5.tar.gz cpython-0a7ac7d70d370544c6a9d118bbbd6886ad4f5ce5.tar.bz2 |
Create the dbm package from PEP 3108. #2881.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Setup.dist | 8 | ||||
-rw-r--r-- | Modules/_dbmmodule.c (renamed from Modules/dbmmodule.c) | 8 | ||||
-rw-r--r-- | Modules/_gdbmmodule.c (renamed from Modules/gdbmmodule.c) | 8 | ||||
-rw-r--r-- | Modules/_threadmodule.c | 4 |
4 files changed, 14 insertions, 14 deletions
diff --git a/Modules/Setup.dist b/Modules/Setup.dist index 6c201c9..88c85b5 100644 --- a/Modules/Setup.dist +++ b/Modules/Setup.dist @@ -294,8 +294,8 @@ _symtable symtablemodule.c # Modules that provide persistent dictionary-like semantics. You will # probably want to arrange for at least one of them to be available on # your machine, though none are defined by default because of library -# dependencies. The Python module anydbm.py provides an -# implementation independent wrapper for these; dumbdbm.py provides +# dependencies. The Python module dbm/__init__.py provides an +# implementation independent wrapper for these; dbm/dumb.py provides # similar functionality (but slower of course) implemented in Python. # The standard Unix dbm module has been moved to Setup.config so that @@ -305,13 +305,13 @@ _symtable symtablemodule.c # # First, look at Setup.config; configure may have set this for you. -#dbm dbmmodule.c # dbm(3) may require -lndbm or similar +#_dbm _dbmmodule.c # dbm(3) may require -lndbm or similar # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: # # First, look at Setup.config; configure may have set this for you. -#gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm +#_gdbm _gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm # Sleepycat Berkeley DB interface. diff --git a/Modules/dbmmodule.c b/Modules/_dbmmodule.c index 875f0e7..1a49e24 100644 --- a/Modules/dbmmodule.c +++ b/Modules/_dbmmodule.c @@ -332,7 +332,7 @@ dbm_getattr(dbmobject *dp, char *name) static PyTypeObject Dbmtype = { PyVarObject_HEAD_INIT(NULL, 0) - "dbm.dbm", + "_dbm.dbm", sizeof(dbmobject), 0, (destructor)dbm_dealloc, /*tp_dealloc*/ @@ -391,17 +391,17 @@ static PyMethodDef dbmmodule_methods[] = { }; PyMODINIT_FUNC -initdbm(void) { +init_dbm(void) { PyObject *m, *d, *s; if (PyType_Ready(&Dbmtype) < 0) return; - m = Py_InitModule("dbm", dbmmodule_methods); + m = Py_InitModule("_dbm", dbmmodule_methods); if (m == NULL) return; d = PyModule_GetDict(m); if (DbmError == NULL) - DbmError = PyErr_NewException("dbm.error", NULL, NULL); + DbmError = PyErr_NewException("_dbm.error", NULL, NULL); s = PyUnicode_FromString(which_dbm); if (s != NULL) { PyDict_SetItemString(d, "library", s); diff --git a/Modules/gdbmmodule.c b/Modules/_gdbmmodule.c index a8abbd3..4404d2f 100644 --- a/Modules/gdbmmodule.c +++ b/Modules/_gdbmmodule.c @@ -389,7 +389,7 @@ dbm_getattr(dbmobject *dp, char *name) static PyTypeObject Dbmtype = { PyVarObject_HEAD_INIT(0, 0) - "gdbm.gdbm", + "_gdbm.gdbm", sizeof(dbmobject), 0, (destructor)dbm_dealloc, /*tp_dealloc*/ @@ -512,18 +512,18 @@ static PyMethodDef dbmmodule_methods[] = { }; PyMODINIT_FUNC -initgdbm(void) { +init_gdbm(void) { PyObject *m, *d, *s; if (PyType_Ready(&Dbmtype) < 0) return; - m = Py_InitModule4("gdbm", dbmmodule_methods, + m = Py_InitModule4("_gdbm", dbmmodule_methods, gdbmmodule__doc__, (PyObject *)NULL, PYTHON_API_VERSION); if (m == NULL) return; d = PyModule_GetDict(m); - DbmError = PyErr_NewException("gdbm.error", NULL, NULL); + DbmError = PyErr_NewException("_gdbm.error", NULL, NULL); if (DbmError != NULL) { PyDict_SetItemString(d, "error", DbmError); s = PyUnicode_FromString(dbmmodule_open_flags); diff --git a/Modules/_threadmodule.c b/Modules/_threadmodule.c index 971ff56..5b8fc98 100644 --- a/Modules/_threadmodule.c +++ b/Modules/_threadmodule.c @@ -127,7 +127,7 @@ lock_getattr(lockobject *self, char *name) static PyTypeObject Locktype = { PyVarObject_HEAD_INIT(&PyType_Type, 0) - "thread.lock", /*tp_name*/ + "_thread.lock", /*tp_name*/ sizeof(lockobject), /*tp_size*/ 0, /*tp_itemsize*/ /* methods */ @@ -336,7 +336,7 @@ static PyObject *local_getattro(localobject *, PyObject *); static PyTypeObject localtype = { PyVarObject_HEAD_INIT(NULL, 0) - /* tp_name */ "thread._local", + /* tp_name */ "_thread._local", /* tp_basicsize */ sizeof(localobject), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor)local_dealloc, |