Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
33372529
Commit
33372529
authored
May 20, 2011
by
Peter Eastman
Browse files
Bug fix: State.getParameters() always returned None
parent
9eb00769
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
wrappers/python/src/swig_doxygen/swig_lib/python/extend.i
wrappers/python/src/swig_doxygen/swig_lib/python/extend.i
+4
-2
No files found.
wrappers/python/src/swig_doxygen/swig_lib/python/extend.i
View file @
33372529
...
...
@@ -60,8 +60,10 @@
Py_INCREF
(
Py_None
)
;
}
if
(
getParameters
)
{
pParameters
=
Py_None
;
Py_INCREF
(
Py_None
)
;
pParameters
=
PyDict_New
()
;
const
std
::
map
<
std
::
string
,
double
>
&
params
=
state
.
getParameters
()
;
for
(
std
::
map
<
std
::
string
,
double
>::
const_iterator
iter
=
params
.
begin
()
;
iter
!=
params
.
end
()
;
++
iter
)
PyDict_SetItemString
(
pParameters
,
iter-
>
first
.
c_str
(),
Py_BuildValue
(
"d"
,
iter-
>
second
))
;
}
else
{
pParameters
=
Py_None
;
Py_INCREF
(
Py_None
)
;
...
...
Write
Preview
Markdown
is supported
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