Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
VTK
VTK
Commits
1f1f9f47
Commit
1f1f9f47
authored
Jul 21, 2015
by
David Gobbi
Browse files
Add __dict__ attribute to python-wrapped objects.
parent
e479eb83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Wrapping/PythonCore/PyVTKObject.cxx
View file @
1f1f9f47
...
...
@@ -231,6 +231,13 @@ void PyVTKObject_Delete(PyObject *op)
//--------------------------------------------------------------------
// This defines any special attributes of wrapped VTK objects.
static
PyObject
*
PyVTKObject_GetDict
(
PyObject
*
op
,
void
*
)
{
PyVTKObject
*
self
=
(
PyVTKObject
*
)
op
;
Py_INCREF
(
self
->
vtk_dict
);
return
self
->
vtk_dict
;
}
static
PyObject
*
PyVTKObject_GetThis
(
PyObject
*
op
,
void
*
)
{
PyVTKObject
*
self
=
(
PyVTKObject
*
)
op
;
...
...
@@ -253,6 +260,8 @@ static PyObject *PyVTKObject_GetThis(PyObject *op, void *)
}
PyGetSetDef
PyVTKObject_GetSet
[]
=
{
{
(
char
*
)
"__dict__"
,
PyVTKObject_GetDict
,
0
,
(
char
*
)
"Dictionary of attributes set by user."
,
0
},
{
(
char
*
)
"__this__"
,
PyVTKObject_GetThis
,
0
,
(
char
*
)
"Pointer to the C++ object."
,
0
},
{
0
,
0
,
0
,
0
,
0
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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