2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-19 04:22:16 +00:00

(merge from head)

removed tabs (inspect tool)


[SVN r34723]
This commit is contained in:
Gennaro Prota
2006-07-24 22:28:41 +00:00
parent ecf70b05f2
commit 8fb6e1f48d
2 changed files with 9 additions and 9 deletions

View File

@@ -54,7 +54,7 @@ void exec_test()
// Register the module with the interpreter
if (PyImport_AppendInittab("embedded_hello", initembedded_hello) == -1)
throw std::runtime_error("Failed to add embedded_hello to the interpreter's "
"builtin modules");
"builtin modules");
// Retrieve the main module
python::object main = python::import("__main__");

View File

@@ -12,23 +12,23 @@ static void *test=(void *) 78;
void *get()
{
return test;
return test;
}
void *getnull()
{
return 0;
return 0;
}
void use(void *a)
{
if(a!=test)
if(a!=test)
throw std::runtime_error(std::string("failed"));
}
int useany(void *a)
{
return a ? 1 : 0;
return a ? 1 : 0;
}
@@ -36,8 +36,8 @@ namespace bpl = boost::python;
BOOST_PYTHON_MODULE(voidptr_ext)
{
bpl::def("get", &::get, bpl::return_value_policy<bpl::return_opaque_pointer>());
bpl::def("getnull", &::getnull, bpl::return_value_policy<bpl::return_opaque_pointer>());
bpl::def("use", &::use);
bpl::def("useany", &::useany);
bpl::def("get", &::get, bpl::return_value_policy<bpl::return_opaque_pointer>());
bpl::def("getnull", &::getnull, bpl::return_value_policy<bpl::return_opaque_pointer>());
bpl::def("use", &::use);
bpl::def("useany", &::useany);
}