Commit 159caa60 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[trac983] added basic action constants

parent 2bfafa08
......@@ -16,6 +16,8 @@
#include <util/python/pycppwrapper_util.h>
#include <acl/acl.h>
#include "acl.h"
using namespace isc::util::python;
......@@ -58,6 +60,16 @@ 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.
PyObjectContainer(Py_BuildValue("I", isc::acl::ACCEPT)).
installToModule(mod, "ACCEPT", false);
PyObjectContainer(Py_BuildValue("I", isc::acl::REJECT)).
installToModule(mod, "REJECT", false);
PyObjectContainer(Py_BuildValue("I", isc::acl::DROP)).
installToModule(mod, "DROP", false);
} catch (...) {
Py_DECREF(mod);
return (NULL);
......
PYCOVERAGE_RUN = @PYCOVERAGE_RUN@
PYTESTS = dns_test.py
PYTESTS = acl_test.py dns_test.py
EXTRA_DIST = $(PYTESTS)
......
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