From 8c4528713d907ee2cfd3bfcbbad272c749867f84 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 25 Jun 2013 22:59:01 +0000 Subject: Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_54_0.tar.bz2. --- libs/python/example/tutorial/hello.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 libs/python/example/tutorial/hello.cpp (limited to 'libs/python/example/tutorial/hello.cpp') diff --git a/libs/python/example/tutorial/hello.cpp b/libs/python/example/tutorial/hello.cpp new file mode 100644 index 000000000..d5114312b --- /dev/null +++ b/libs/python/example/tutorial/hello.cpp @@ -0,0 +1,20 @@ +// Copyright Joel de Guzman 2002-2004. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) +// Hello World Example from the tutorial +// [Joel de Guzman 10/9/2002] + +#include +#include + +char const* greet() +{ + return "hello, world"; +} + +BOOST_PYTHON_MODULE(hello_ext) +{ + using namespace boost::python; + def("greet", greet); +} + -- cgit v1.2.1