Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
eigenpy
Commits
6b4379e3
Verified
Commit
6b4379e3
authored
Jul 30, 2021
by
Justin Carpentier
Browse files
types: getitem should not use references
parent
8dc3d805
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/eigenpy/user-type.hpp
View file @
6b4379e3
...
...
@@ -71,12 +71,11 @@ namespace eigenpy
///
/// \returns PyObject corresponding to the python datastream.
///
inline
static
PyObject
*
getitem
(
void
*
ip
,
void
*
ap
)
inline
static
PyObject
*
getitem
(
void
*
ip
,
void
*
/*ap*/
)
{
// std::cout << "getitem" << std::endl;
PyArrayObject
*
py_array
=
static_cast
<
PyArrayObject
*>
(
ap
);
// std::cout << "getitem" << std::endl;
T
*
elt_ptr
=
static_cast
<
T
*>
(
ip
);
bp
::
object
m
(
boost
::
ref
(
*
elt_ptr
)
)
;
bp
::
object
m
(
*
elt_ptr
);
Py_INCREF
(
m
.
ptr
());
return
m
.
ptr
();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment