Skip to content

Conversation

@jcarpent
Copy link
Contributor

Should make the job for #231.

@jcarpent jcarpent merged commit 3a7acfc into stack-of-tasks:devel May 19, 2021
{
cl
.def(bp::init<>(bp::arg("self"),"Default constructor"))
.def(bp::init<>(bp::arg("self"),"Default constructor")[bp::return_value_policy<bp::return_by_value>()])
Copy link
Member

@cmastalli cmastalli May 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to use with_custodian_and_ward, i.e.,

def(bp::init<>(bp::arg("self"),"Default constructor")[bp::with_custodian_and_ward_postcall<0, 1>()]

.def(bp::init<Vector4>((bp::arg("self"),bp::arg("vec4")),
"Initialize from a vector 4D.\n"
"\tvec4 : a 4D vector representing quaternion coefficients in the order xyzw."))
"\tR : a rotation matrix 3x3.")[bp::return_value_policy<bp::return_by_value>()])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here it should be

  "\tR : a rotation matrix 3x3.")[bp::with_custodian_and_ward_postcall<0, 2>()])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants