Commit 673a619c authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[trac983] clarified comments on refcount of some python constant objects.

parent f8092952
......@@ -60,9 +60,11 @@ PyInit_acl(void) {
po_LoaderError = PyErr_NewException("isc.acl.LoaderError", NULL, NULL);
PyObjectContainer(po_LoaderError).installToModule(mod, "LoaderError");
// Install module constants. Note that we can release our own
// references to these objects because we don't have corresponding
// C++ variables.
// Install module constants. Note that we can let Py_BuildValue
// "steal" the references to these object (by specifying false to
// installToModule), because, unlike the exception cases above,
// we don't have corresponding C++ variables (see the note in
// pycppwrapper_util for more details).
PyObjectContainer(Py_BuildValue("I", isc::acl::ACCEPT)).
installToModule(mod, "ACCEPT", false);
PyObjectContainer(Py_BuildValue("I", isc::acl::REJECT)).
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment