| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,23 @@ | |||
| 1 | + // Copyright David Abrahams 2002. Permission to copy, use, | ||
| 2 | + // modify, sell and distribute this software is granted provided this | ||
| 3 | + // copyright notice appears in all copies. This software is provided | ||
| 4 | + // "as is" without express or implied warranty, and with no claim as | ||
| 5 | + // to its suitability for any purpose. | ||
| 6 | + #ifndef SHARED_PTR_DELETER_DWA2002121_HPP | ||
| 7 | + # define SHARED_PTR_DELETER_DWA2002121_HPP | ||
| 8 | + | ||
| 9 | + namespace boost { namespace python { namespace converter { | ||
| 10 | + | ||
| 11 | + struct shared_ptr_deleter | ||
| 12 | + { | ||
| 13 | + shared_ptr_deleter(handle<> owner) | ||
| 14 | + : owner(owner) {} | ||
| 15 | + | ||
| 16 | + void operator()(void const*) { owner.reset(); } | ||
| 17 | + | ||
| 18 | + handle<> owner; | ||
| 19 | + }; | ||
| 20 | + | ||
| 21 | + }}} // namespace boost::python::converter | ||
| 22 | + | ||
| 23 | + #endif // SHARED_PTR_DELETER_DWA2002121_HPP | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments