Skip to content

Commit 4ca4360

Browse files
committed
fixup! develop
1 parent 7770343 commit 4ca4360

File tree

6 files changed

+87
-87
lines changed

6 files changed

+87
-87
lines changed

include/boost/python/converter/pointer_type_id.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ namespace detail
5656
// Returns a type_info associated with the type pointed
5757
// to by T, which may be a pointer or a reference to a pointer.
5858
template <class T>
59-
type_info pointer_type_id(T(*)() = 0)
59+
type_info pointer_type_id(T(*)() = BOOST_NULLPTR)
6060
{
6161
return detail::pointer_typeid_select<
6262
boost::python::detail::is_lvalue_reference<T>::value
63-
>::execute((T(*)())0);
63+
>::execute((T(*)())BOOST_NULLPTR);
6464
}
6565

6666
}}} // namespace boost::python::converter

include/boost/python/exception_translator.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
namespace boost { namespace python {
1717

1818
template <class ExceptionType, class Translate>
19-
void register_exception_translator(Translate translate, boost::type<ExceptionType>* = 0)
19+
void register_exception_translator(Translate translate, boost::type<ExceptionType>* = BOOST_NULLPTR)
2020
{
2121
using namespace boost::placeholders;
2222
detail::register_exception_handler(

include/boost/python/lvalue_from_pytype.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ namespace detail
3939
typedef typename add_lvalue_reference<U>::type param;
4040
return &Extractor::execute(
4141
boost::python::detail::void_ptr_to_reference(
42-
op, (param(*)())0 )
42+
op, (param(*)())BOOST_NULLPTR )
4343
);
4444
}
4545
};
@@ -51,7 +51,7 @@ namespace detail
5151
// usage: normalize<Extractor>(&Extractor::execute)
5252
template <class Extractor, class T, class U>
5353
inline normalized_extractor<Extractor,U>
54-
normalize(T(*)(U), Extractor* = 0)
54+
normalize(T(*)(U), Extractor* = BOOST_NULLPTR)
5555
{
5656
return normalized_extractor<Extractor, U>();
5757
}

test/a_map_indexing_suite.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ struct AFromPython
4949
static void* convertible(PyObject* obj_ptr)
5050
{
5151
#if PY_VERSION_HEX >= 0x03000000
52-
if (!PyLong_Check(obj_ptr)) return 0;
52+
if (!PyLong_Check(obj_ptr)) return BOOST_NULLPTR;
5353
#else
54-
if (!PyInt_Check(obj_ptr)) return 0;
54+
if (!PyInt_Check(obj_ptr)) return BOOST_NULLPTR;
5555
#endif
5656
return obj_ptr;
5757
}

test/borrowed.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ void assert_not_borrowed_ptr(T const&)
2222

2323
int main()
2424
{
25-
assert_borrowed_ptr(borrowed((PyObject*)0));
26-
assert_borrowed_ptr(borrowed((PyTypeObject*)0));
27-
assert_borrowed_ptr((detail::borrowed<PyObject> const*)0);
28-
assert_borrowed_ptr((detail::borrowed<PyObject> volatile*)0);
29-
assert_borrowed_ptr((detail::borrowed<PyObject> const volatile*)0);
30-
assert_not_borrowed_ptr((PyObject*)0);
25+
assert_borrowed_ptr(borrowed((PyObject*)BOOST_NULLPTR));
26+
assert_borrowed_ptr(borrowed((PyTypeObject*)BOOST_NULLPTR));
27+
assert_borrowed_ptr((detail::borrowed<PyObject> const*)BOOST_NULLPTR);
28+
assert_borrowed_ptr((detail::borrowed<PyObject> volatile*)BOOST_NULLPTR);
29+
assert_borrowed_ptr((detail::borrowed<PyObject> const volatile*)BOOST_NULLPTR);
30+
assert_not_borrowed_ptr((PyObject*)BOOST_NULLPTR);
3131
assert_not_borrowed_ptr(0);
3232
return 0;
3333
}

test/m1.cpp

Lines changed: 74 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -38,47 +38,47 @@ PyTypeObject NoddyType = {
3838
0,
3939
dealloc, /* tp_dealloc */
4040
0, /* tp_print */
41-
0, /* tp_getattr */
42-
0, /* tp_setattr */
43-
0, /* tp_compare */
44-
0, /* tp_repr */
45-
0, /* tp_as_number */
46-
0, /* tp_as_sequence */
47-
0, /* tp_as_mapping */
48-
0, /* tp_hash */
49-
0, /* tp_call */
50-
0, /* tp_str */
51-
0, /* tp_getattro */
52-
0, /* tp_setattro */
53-
0, /* tp_as_buffer */
41+
BOOST_NULLPTR, /* tp_getattr */
42+
BOOST_NULLPTR, /* tp_setattr */
43+
BOOST_NULLPTR, /* tp_compare */
44+
BOOST_NULLPTR, /* tp_repr */
45+
BOOST_NULLPTR, /* tp_as_number */
46+
BOOST_NULLPTR, /* tp_as_sequence */
47+
BOOST_NULLPTR, /* tp_as_mapping */
48+
BOOST_NULLPTR, /* tp_hash */
49+
BOOST_NULLPTR, /* tp_call */
50+
BOOST_NULLPTR, /* tp_str */
51+
BOOST_NULLPTR, /* tp_getattro */
52+
BOOST_NULLPTR, /* tp_setattro */
53+
BOOST_NULLPTR, /* tp_as_buffer */
5454
0, /* tp_flags */
55-
0, /* tp_doc */
56-
0, /* tp_traverse */
57-
0, /* tp_clear */
58-
0, /* tp_richcompare */
55+
BOOST_NULLPTR, /* tp_doc */
56+
BOOST_NULLPTR, /* tp_traverse */
57+
BOOST_NULLPTR, /* tp_clear */
58+
BOOST_NULLPTR, /* tp_richcompare */
5959
0, /* tp_weaklistoffset */
60-
0, /* tp_iter */
61-
0, /* tp_iternext */
62-
0, /* tp_methods */
63-
0, /* tp_members */
64-
0, /* tp_getset */
65-
0, /* tp_base */
66-
0, /* tp_dict */
67-
0, /* tp_descr_get */
68-
0, /* tp_descr_set */
60+
BOOST_NULLPTR, /* tp_iter */
61+
BOOST_NULLPTR, /* tp_iternext */
62+
BOOST_NULLPTR, /* tp_methods */
63+
BOOST_NULLPTR, /* tp_members */
64+
BOOST_NULLPTR, /* tp_getset */
65+
BOOST_NULLPTR, /* tp_base */
66+
BOOST_NULLPTR, /* tp_dict */
67+
BOOST_NULLPTR, /* tp_descr_get */
68+
BOOST_NULLPTR, /* tp_descr_set */
6969
0, /* tp_dictoffset */
70-
0, /* tp_init */
71-
0, /* tp_alloc */
72-
0, /* tp_new */
73-
0, /* tp_free */
74-
0, /* tp_is_gc */
75-
0, /* tp_bases */
76-
0, /* tp_mro */
77-
0, /* tp_cache */
78-
0, /* tp_subclasses */
79-
0, /* tp_weaklist */
70+
BOOST_NULLPTR, /* tp_init */
71+
BOOST_NULLPTR, /* tp_alloc */
72+
BOOST_NULLPTR, /* tp_new */
73+
BOOST_NULLPTR, /* tp_free */
74+
BOOST_NULLPTR, /* tp_is_gc */
75+
BOOST_NULLPTR, /* tp_bases */
76+
BOOST_NULLPTR, /* tp_mro */
77+
BOOST_NULLPTR, /* tp_cache */
78+
BOOST_NULLPTR, /* tp_subclasses */
79+
BOOST_NULLPTR, /* tp_weaklist */
8080
#if PYTHON_API_VERSION >= 1012
81-
0 /* tp_del */
81+
BOOST_NULLPTR /* tp_del */
8282
#endif
8383
};
8484

@@ -109,47 +109,47 @@ PyTypeObject SimpleType = {
109109
0,
110110
dealloc, /* tp_dealloc */
111111
0, /* tp_print */
112-
0, /* tp_getattr */
113-
0, /* tp_setattr */
114-
0, /* tp_compare */
115-
0, /* tp_repr */
116-
0, /* tp_as_number */
117-
0, /* tp_as_sequence */
118-
0, /* tp_as_mapping */
119-
0, /* tp_hash */
120-
0, /* tp_call */
121-
0, /* tp_str */
122-
0, /* tp_getattro */
123-
0, /* tp_setattro */
124-
0, /* tp_as_buffer */
112+
BOOST_NULLPTR, /* tp_getattr */
113+
BOOST_NULLPTR, /* tp_setattr */
114+
BOOST_NULLPTR, /* tp_compare */
115+
BOOST_NULLPTR, /* tp_repr */
116+
BOOST_NULLPTR, /* tp_as_number */
117+
BOOST_NULLPTR, /* tp_as_sequence */
118+
BOOST_NULLPTR, /* tp_as_mapping */
119+
BOOST_NULLPTR, /* tp_hash */
120+
BOOST_NULLPTR, /* tp_call */
121+
BOOST_NULLPTR, /* tp_str */
122+
BOOST_NULLPTR, /* tp_getattro */
123+
BOOST_NULLPTR, /* tp_setattro */
124+
BOOST_NULLPTR, /* tp_as_buffer */
125125
0, /* tp_flags */
126-
0, /* tp_doc */
127-
0, /* tp_traverse */
128-
0, /* tp_clear */
129-
0, /* tp_richcompare */
126+
BOOST_NULLPTR, /* tp_doc */
127+
BOOST_NULLPTR, /* tp_traverse */
128+
BOOST_NULLPTR, /* tp_clear */
129+
BOOST_NULLPTR, /* tp_richcompare */
130130
0, /* tp_weaklistoffset */
131-
0, /* tp_iter */
132-
0, /* tp_iternext */
133-
0, /* tp_methods */
134-
0, /* tp_members */
135-
0, /* tp_getset */
136-
0, /* tp_base */
137-
0, /* tp_dict */
138-
0, /* tp_descr_get */
139-
0, /* tp_descr_set */
131+
BOOST_NULLPTR, /* tp_iter */
132+
BOOST_NULLPTR, /* tp_iternext */
133+
BOOST_NULLPTR, /* tp_methods */
134+
BOOST_NULLPTR, /* tp_members */
135+
BOOST_NULLPTR, /* tp_getset */
136+
BOOST_NULLPTR, /* tp_base */
137+
BOOST_NULLPTR, /* tp_dict */
138+
BOOST_NULLPTR, /* tp_descr_get */
139+
BOOST_NULLPTR, /* tp_descr_set */
140140
0, /* tp_dictoffset */
141-
0, /* tp_init */
142-
0, /* tp_alloc */
143-
0, /* tp_new */
144-
0, /* tp_free */
145-
0, /* tp_is_gc */
146-
0, /* tp_bases */
147-
0, /* tp_mro */
148-
0, /* tp_cache */
149-
0, /* tp_subclasses */
150-
0, /* tp_weaklist */
141+
BOOST_NULLPTR, /* tp_init */
142+
BOOST_NULLPTR, /* tp_alloc */
143+
BOOST_NULLPTR, /* tp_new */
144+
BOOST_NULLPTR, /* tp_free */
145+
BOOST_NULLPTR, /* tp_is_gc */
146+
BOOST_NULLPTR, /* tp_bases */
147+
BOOST_NULLPTR, /* tp_mro */
148+
BOOST_NULLPTR, /* tp_cache */
149+
BOOST_NULLPTR, /* tp_subclasses */
150+
BOOST_NULLPTR, /* tp_weaklist */
151151
#if PYTHON_API_VERSION >= 1012
152-
0 /* tp_del */
152+
BOOST_NULLPTR /* tp_del */
153153
#endif
154154
};
155155

0 commit comments

Comments
 (0)