summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-02-04 01:54:49 (GMT)
committerGuido van Rossum <guido@python.org>2003-02-04 01:54:49 (GMT)
commitd4b920c8bd2d41b49d30c89fe9732ff443fe71f8 (patch)
tree0cf3efd4ca829c91aa1b2386c6dbc1407622b493 /Modules
parent322d553143b464ffa9b72105927469279cf3c31a (diff)
downloadcpython-d4b920c8bd2d41b49d30c89fe9732ff443fe71f8.zip
cpython-d4b920c8bd2d41b49d30c89fe9732ff443fe71f8.tar.gz
cpython-d4b920c8bd2d41b49d30c89fe9732ff443fe71f8.tar.bz2
Rename the extension registry variables to have leading underscores --
this clarifies that they are part of an internal API (albeit shared between pickle.py, copy_reg.py and cPickle.c). I'd like to do the same for copy_reg.dispatch_table, but worry that it might be used by existing code. This risk doesn't exist for the extension registry.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/cPickle.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/cPickle.c b/Modules/cPickle.c
index 3d245d8..f5aadd2 100644
--- a/Modules/cPickle.c
+++ b/Modules/cPickle.c
@@ -102,11 +102,11 @@ static PyObject *empty_tuple;
static PyObject *dispatch_table;
/* For EXT[124] opcodes. */
-/* copy_reg.extension_registry, {(module_name, function_name): code} */
+/* copy_reg._extension_registry, {(module_name, function_name): code} */
static PyObject *extension_registry;
-/* copy_reg.inverted_registry, {code: (module_name, function_name)} */
+/* copy_reg._inverted_registry, {code: (module_name, function_name)} */
static PyObject *inverted_registry;
-/* copy_reg.extension_cache, {code: object} */
+/* copy_reg._extension_cache, {code: object} */
static PyObject *extension_cache;
static PyObject *__class___str, *__getinitargs___str, *__dict___str,
@@ -5092,15 +5092,15 @@ init_stuff(PyObject *module_dict)
if (!dispatch_table) return -1;
extension_registry = PyObject_GetAttrString(copy_reg,
- "extension_registry");
+ "_extension_registry");
if (!extension_registry) return -1;
inverted_registry = PyObject_GetAttrString(copy_reg,
- "inverted_registry");
+ "_inverted_registry");
if (!inverted_registry) return -1;
extension_cache = PyObject_GetAttrString(copy_reg,
- "extension_cache");
+ "_extension_cache");
if (!extension_cache) return -1;
Py_DECREF(copy_reg);