Skip to content

Commit 0e5e2dc

Browse files
author
Ralf W. Grosse-Kunstleve
committed
includes moved to satisfy the "Python.h first" requirement
[SVN r27386]
1 parent 4d50bf0 commit 0e5e2dc

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

example/getting_started1.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Software License, Version 1.0. (See accompanying
33
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
44

5+
#include <boost/python/module.hpp>
6+
#include <boost/python/def.hpp>
57
#include <string>
68

79
namespace { // Avoid cluttering the global namespace.
@@ -11,8 +13,6 @@ namespace { // Avoid cluttering the global namespace.
1113
int square(int number) { return number * number; }
1214
}
1315

14-
#include <boost/python/module.hpp>
15-
#include <boost/python/def.hpp>
1616
namespace python = boost::python;
1717

1818
// Python requires an exported function called init<module-name> in every

example/getting_started2.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Software License, Version 1.0. (See accompanying
33
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
44

5+
#include <boost/python/class.hpp>
6+
#include <boost/python/module.hpp>
7+
#include <boost/python/def.hpp>
58
#include <iostream>
69
#include <string>
710

@@ -23,10 +26,6 @@ namespace { // Avoid cluttering the global namespace.
2326
}
2427
}
2528

26-
#include <boost/python/class.hpp>
27-
#include <boost/python/module.hpp>
28-
#include <boost/python/def.hpp>
29-
3029
BOOST_PYTHON_MODULE(getting_started2)
3130
{
3231
using namespace boost::python;

0 commit comments

Comments
 (0)