Boost logo

Boost Users :

Subject: Re: [Boost-users] Simple boost::python::dict question (I hope)
From: Dave Abrahams (dave_at_[hidden])
Date: 2010-12-17 12:49:34


On Fri, Dec 17, 2010 at 9:42 AM, Tim Aerts <tim.aerts_at_[hidden]> wrote:
> Hello,
>
> I have a pretty urgent matter. Is it possible to add an element to a
> Python's dict using boost::python?
>
> I tried:
>
>    extrafields["validated"] = "False";
>
> With 'extrafields' in this case being a boost::python::dict
>
> But that crashes. I hope this will be an easy one... :)

That sort of thing works with Boost.Python and is tested on a regular
basis as part of the standard regression tests. If it's crashing for
you, there's most likely something wrong with your build, or you've
previously corrupted memory and you're only now jiggling the right
bits to make it blow up.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net