summaryrefslogtreecommitdiff
path: root/gruel/src/lib/pmt
diff options
context:
space:
mode:
Diffstat (limited to 'gruel/src/lib/pmt')
-rw-r--r--gruel/src/lib/pmt/CMakeLists.txt2
-rw-r--r--gruel/src/lib/pmt/pmt.cc14
-rw-r--r--gruel/src/lib/pmt/pmt_int.h9
3 files changed, 3 insertions, 22 deletions
diff --git a/gruel/src/lib/pmt/CMakeLists.txt b/gruel/src/lib/pmt/CMakeLists.txt
index dc70f03d7..72bd27a04 100644
--- a/gruel/src/lib/pmt/CMakeLists.txt
+++ b/gruel/src/lib/pmt/CMakeLists.txt
@@ -67,7 +67,7 @@ add_custom_command(
${CMAKE_CURRENT_SOURCE_DIR}/unv_template.h.t
${CMAKE_CURRENT_SOURCE_DIR}/unv_template.cc.t
${CMAKE_CURRENT_SOURCE_DIR}/unv_qa_template.cc.t
- COMMAND ${PYTHON_EXECUTABLE} -B -c
+ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} -c
\"import os,sys\;srcdir='${CMAKE_CURRENT_SOURCE_DIR}'\;sys.path.append(srcdir)\;os.environ['srcdir']=srcdir\;from generate_unv import main\;main()\"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
diff --git a/gruel/src/lib/pmt/pmt.cc b/gruel/src/lib/pmt/pmt.cc
index a7e0fd19f..1d9125d4e 100644
--- a/gruel/src/lib/pmt/pmt.cc
+++ b/gruel/src/lib/pmt/pmt.cc
@@ -58,7 +58,7 @@ pmt_base::operator delete(void *p, size_t size)
#endif
void intrusive_ptr_add_ref(pmt_base* p) { ++(p->count_); }
-void intrusive_ptr_release(pmt_base* p) { if (--(p->count_) == 0 ) p->deleter_(p); }
+void intrusive_ptr_release(pmt_base* p) { if (--(p->count_) == 0 ) delete p; }
pmt_base::~pmt_base()
{
@@ -1383,16 +1383,4 @@ pmt_dump_sizeof()
printf("sizeof(pmt_uniform_vector) = %3zd\n", sizeof(pmt_uniform_vector));
}
-/*
- * ------------------------------------------------------------------------
- * advanced
- * ------------------------------------------------------------------------
- */
-
-void
-pmt_set_deleter(pmt_t obj, boost::function<void(pmt_base *)> &deleter)
-{
- obj->deleter_ = (deleter)? deleter : &pmt_base::default_deleter;
-}
-
} /* namespace pmt */
diff --git a/gruel/src/lib/pmt/pmt_int.h b/gruel/src/lib/pmt/pmt_int.h
index bd2b5fe5a..d669e1049 100644
--- a/gruel/src/lib/pmt/pmt_int.h
+++ b/gruel/src/lib/pmt/pmt_int.h
@@ -38,15 +38,8 @@ namespace pmt {
class GRUEL_API pmt_base : boost::noncopyable {
mutable boost::detail::atomic_count count_;
-public:
- static void default_deleter(pmt_base *p){
- delete p;
- }
-
- boost::function<void(pmt_base *)> deleter_;
-
protected:
- pmt_base() : count_(0), deleter_(&pmt::pmt_base::default_deleter) {};
+ pmt_base() : count_(0) {};
virtual ~pmt_base();
public: