Rev | Line | |
---|
[857] | 1 | // Copyright David Abrahams 2002.
|
---|
| 2 | // Distributed under the Boost Software License, Version 1.0. (See
|
---|
| 3 | // accompanying file LICENSE_1_0.txt or copy at
|
---|
| 4 | // http://www.boost.org/LICENSE_1_0.txt)
|
---|
| 5 | #ifndef BASE_TYPE_TRAITS_DWA2002614_HPP
|
---|
| 6 | # define BASE_TYPE_TRAITS_DWA2002614_HPP
|
---|
| 7 |
|
---|
| 8 | # include <boost/python/detail/prefix.hpp>
|
---|
| 9 |
|
---|
| 10 | namespace boost { namespace python {
|
---|
| 11 |
|
---|
| 12 | namespace detail
|
---|
| 13 | {
|
---|
| 14 | struct unspecialized {};
|
---|
| 15 | }
|
---|
| 16 |
|
---|
| 17 | // Derive from unspecialized so we can detect whether traits are
|
---|
| 18 | // specialized
|
---|
| 19 | template <class T> struct base_type_traits
|
---|
| 20 | : detail::unspecialized
|
---|
| 21 | {};
|
---|
| 22 |
|
---|
| 23 | template <>
|
---|
| 24 | struct base_type_traits<PyObject>
|
---|
| 25 | {
|
---|
| 26 | typedef PyObject type;
|
---|
| 27 | };
|
---|
| 28 |
|
---|
| 29 | template <>
|
---|
| 30 | struct base_type_traits<PyTypeObject>
|
---|
| 31 | {
|
---|
| 32 | typedef PyObject type;
|
---|
| 33 | };
|
---|
| 34 |
|
---|
| 35 | template <>
|
---|
| 36 | struct base_type_traits<PyMethodObject>
|
---|
| 37 | {
|
---|
| 38 | typedef PyObject type;
|
---|
| 39 | };
|
---|
| 40 |
|
---|
| 41 | }} // namespace boost::python
|
---|
| 42 |
|
---|
| 43 | #endif // BASE_TYPE_TRAITS_DWA2002614_HPP
|
---|
Note: See
TracBrowser
for help on using the repository browser.