File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ void exec_test()
5454 // Register the module with the interpreter
5555 if (PyImport_AppendInittab (" embedded_hello" , initembedded_hello) == -1 )
5656 throw std::runtime_error (" Failed to add embedded_hello to the interpreter's "
57- " builtin modules" );
57+ " builtin modules" );
5858 // Retrieve the main module
5959 python::object main = python::import (" __main__" );
6060
Original file line number Diff line number Diff line change @@ -12,32 +12,32 @@ static void *test=(void *) 78;
1212
1313void *get ()
1414{
15- return test;
15+ return test;
1616}
1717
1818void *getnull ()
1919{
20- return 0 ;
20+ return 0 ;
2121}
2222
2323void use (void *a)
2424{
25- if (a!=test)
25+ if (a!=test)
2626 throw std::runtime_error (std::string (" failed" ));
2727}
2828
2929int useany (void *a)
3030{
31- return a ? 1 : 0 ;
31+ return a ? 1 : 0 ;
3232}
3333
3434
3535namespace bpl = boost::python;
3636
3737BOOST_PYTHON_MODULE (voidptr_ext)
3838{
39- bpl::def (" get" , &::get, bpl::return_value_policy<bpl::return_opaque_pointer>());
40- bpl::def (" getnull" , &::getnull, bpl::return_value_policy<bpl::return_opaque_pointer>());
41- bpl::def (" use" , &::use);
42- bpl::def (" useany" , &::useany);
39+ bpl::def (" get" , &::get, bpl::return_value_policy<bpl::return_opaque_pointer>());
40+ bpl::def (" getnull" , &::getnull, bpl::return_value_policy<bpl::return_opaque_pointer>());
41+ bpl::def (" use" , &::use);
42+ bpl::def (" useany" , &::useany);
4343}
You can’t perform that action at this time.
0 commit comments