<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<div class="moz-text-flowed"
style="font-family: -moz-fixed; font-size: 13px;" lang="x-western">Sending
again, as my original reply apparently got lost, sorry if it didn't.<br>
<br>
IMO, the easiest route would be to wrap the member functions :
<br>
<br>
namespace {
<br>
<br>
std::string video_getDeviceName_wrapped(int deviceID)
<br>
{
<br>
char* name = videoInput::getDeviceName(devideID);
<br>
std::string result(name);
<br>
// free 'name' memory if needed
<br>
return result;
<br>
}
<br>
<br>
}
<br>
<br>
and then ::
<br>
<br>
using namespace boost::python;
<br>
BOOST_PYTHON_MODULE(pyVideoInput)
<br>
{
<br>
class_<videoInput>("videoInput")
<br>
.def("getDeviceName", &video_getDeviceName_wrapped)
<br>
.staticmethod("getDeviceName")
<br>
;
<br>
}
<br>
<br>
and you should be done.
<br>
</div>
<br>
</body>
</html>