From 3d3d21150e8e7f34dede814bdbe71bf019791436 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 3 Nov 2009 08:50:41 -0500 Subject: Added Python interface for an item_t enum --- src/py_item.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/py_item.cc') diff --git a/src/py_item.cc b/src/py_item.cc index 91f7b8ac..ac544c6a 100644 --- a/src/py_item.cc +++ b/src/py_item.cc @@ -32,6 +32,7 @@ #include #include "pyinterp.h" +#include "scope.h" #include "mask.h" #include "item.h" @@ -96,7 +97,17 @@ void export_item() scope().attr("ITEM_GENERATED") = ITEM_GENERATED; scope().attr("ITEM_TEMP") = ITEM_TEMP; + enum_< item_t::state_t > ("State") + .value("Uncleared", item_t::UNCLEARED) + .value("Cleared", item_t::CLEARED) + .value("Pending", item_t::PENDING) + ; + +#if 0 + class_< item_t, bases > ("JournalItem", init()) +#else class_< item_t > ("JournalItem", init()) +#endif #if 1 .def("flags", &supports_flags<>::flags) .def("has_flags", &supports_flags<>::has_flags) -- cgit v1.2.3