Update contrib.
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 INSTANCE_DWA200295_HPP
6 # define INSTANCE_DWA200295_HPP
8 # include <boost/python/detail/prefix.hpp>
9 # include <boost/type_traits/alignment_traits.hpp>
12 namespace boost { namespace python
14 struct BOOST_PYTHON_DECL_FORWARD instance_holder;
15 }} // namespace boost::python
17 namespace boost { namespace python { namespace objects {
19 // Each extension instance will be one of these
20 template <class Data = char>
26 instance_holder* objects;
28 typedef typename type_with_alignment<
29 ::boost::alignment_of<Data>::value
35 char bytes[sizeof(Data)];
40 struct additional_instance_size
42 typedef instance<Data> instance_data;
43 typedef instance<char> instance_char;
44 BOOST_STATIC_CONSTANT(
45 std::size_t, value = sizeof(instance_data)
46 - BOOST_PYTHON_OFFSETOF(instance_char,storage));
49 }}} // namespace boost::python::object
51 #endif // INSTANCE_DWA200295_HPP