Re: [C++-sig] boost python calling conventions support patch submission (__stdcall, __cdecl, __fastcall)

2010-01-28 Thread Nicolas Lelong
Le 27/01/2010 17:34, David Abrahams a écrit : I'm not sure exactly what "enable the unit tests" means in this case. Can you be explicit and/or preferably provide an illustrative patch? As I'm a complete bjam noob, I made an attempt that is certainly clumsy and/or inelegant. The idea would

Re: [C++-sig] boost python calling conventions support patch submission (__stdcall, __cdecl, __fastcall)

2010-01-25 Thread Nicolas Lelong
Microsoft calling conventions. Did you consider that point ? Best regards, Nicolas. Le 24/01/2010 03:10, David Abrahams a écrit : At Fri, 15 Jan 2010 18:09:36 +0100, Nicolas Lelong wrote: My previous mail once again got lost, gotta be more careful... Changes (by

Re: [C++-sig] Returning a simple char *

2010-01-20 Thread Nicolas Lelong
IMO, the easiest route would be to wrap the member functions : namespace { std::string video_getDeviceName_wrapped(int deviceID) { char* name = videoInput::getDeviceName(devideID); std::string result(name); // free 'name' memory if needed return result; } } and then :: using namespace

Re: [C++-sig] boost python calling conventions support patch submission (__stdcall, __cdecl, __fastcall)

2010-01-20 Thread Nicolas Lelong
> Please file a trac ticket at svn.boost.org so that this does not get lost. OK Ravi, thanks for the pointer, I should have known I submitted ticket #3833 (https://svn.boost.org/trac/boost/ticket/3833), and will be happy to have feedback about it ! Cheers, Nicolas. _

Re: [C++-sig] boost python calling conventions support patch submission (__stdcall, __cdecl, __fastcall)

2010-01-15 Thread Nicolas Lelong
My previous mail once again got lost, gotta be more careful... Changes (by dave): This looks terrific! I'll try to get it applied ASAP. Please poke me if you don't see it in trunk by the end of the week. Thanks ! As I didn't see the batch in trunk today, I poke you :) > Please file a t

Re: [C++-sig] Conversion problem

2010-01-13 Thread Nicolas Lelong
Simon, it seems that I wrapped the same videoinput library you're using. I wrapped the getPixels the following way : python script is responsible of the memory allocation for pixels buffer (in a correctly sized string). The getPixels function is wrapped as follows : namespace { bool video

Re: [C++-sig] Returning a simple char *

2010-01-13 Thread Nicolas Lelong
Sending again, as my original reply apparently got lost, sorry if it didn't. IMO, the easiest route would be to wrap the member functions : namespace { std::string video_getDeviceName_wrapped(int deviceID) {   char* name = videoInput::getDeviceName(devideID);   std::string result(name);

Re: [C++-sig] boost 1.41 and autolink (maybe the wrong list)

2010-01-06 Thread Nicolas Lelong
> I haven’t done any linking at this point – I am just trying to compile. Yep, but the compiler has predefined macros defined, and the auto_link header tries to prevent linking / crashing problems. You should try to compile using an addition /MD switch to use the dynamically linked C-runtime.

[C++-sig] boost python calling conventions support patch submission (__stdcall, __cdecl, __fastcall)

2010-01-05 Thread Nicolas Lelong
;, &X::g1) +.def("f2", &X::f2) +.def("g2", &X::g2) +.def("f3", &X::f3) +.def("g3", &X::g3) +.def("f4", &X::f4) +.def("g4", &X::g4) +.def("f5", &X::f5) +.def("g5", &X::g

Re: [C++-sig] Boost.Python: wrapping classes instead of functions???

2009-09-11 Thread Nicolas Lelong
David wrote: - I'm using a std::map that will be filled with more than 1 entries: it's a private member of the class in the first case and a global in the second case That may be dumb, but are you sure that you reset your global data structures before or after your free function call. When

Re: [C++-sig] Quick question about wrapping methods that have multiple versions

2009-09-09 Thread Nicolas Lelong
You may disambiguate by using a cast inside .def(), such as .def("getA", (A*(B::*)())B::getA); Whether that's actually more readable is arguable, however. IMHO, this is quite dangerous as the explicit cast prevents the compiler to give you a proper error if the signature of B::getA changes

Re: [C++-sig] Bug and patch for boost.pythonwithenable_shared_from_this

2008-12-12 Thread Nicolas Lelong
FWIW, it seems I can't reproduce the problem with current boost svn trunk code, the problem still existed in boost_1_37_0 though. I could not spot the changes made that fixed the problem. I took a look at the shared_ptr aliasing constructor, and made a patch to my boost_1_37_0 that solves the p

Re: [C++-sig] Bug and patch for boost.python withenable_shared_from_this

2008-12-12 Thread Nicolas Lelong
at could be applied in client code and/or in shared_ptr ? Thanks for your time, best regards, Nicolas Lelong mgdesign Followed by Peter's answer that lead to Trac ticket #2584 : Yes, I am aware of this problem. It is possible today to emulate the proposed functionality by using t