Hi,
I have problem with pointer in function return. My code:
using namespace boost::python;
v8::Platform* InitializePlatform() {
v8::Platform* platform = v8::platform::CreateDefaultPlatform();
return platform;
}
BOOST_PYTHON_MODULE(hello)
{
def("InitializePlatform", InitializePlatform,
return_value_policy());
}
Python code:
import hello
x = hello.InitializePlatform()
Building is ok, but when i try call InitializePlatform i have error:
Segmentation fault
gdb:
(gdb) run test.py
Starting program: /usr/bin/python test.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff45b8700 (LWP 21739)]
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff4924640 in __dynamic_cast () from
/usr/lib/x86_64-linux-gnu/libstdc++.so.6