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
12daada5
Commit
12daada5
authored
Jan 30, 2012
by
Peter Eastman
Browse files
Fixed error in wrapping of arguments that are maps
parent
470c9b7f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
wrappers/python/src/swig_doxygen/OpenMM.i
wrappers/python/src/swig_doxygen/OpenMM.i
+2
-0
wrappers/python/src/swig_doxygen/swig_lib/python/pythoncode.i
...pers/python/src/swig_doxygen/swig_lib/python/pythoncode.i
+11
-0
No files found.
wrappers/python/src/swig_doxygen/OpenMM.i
View file @
12daada5
...
@@ -18,6 +18,7 @@ See https://simtk.org/home/pyopenmm for details"
...
@@ -18,6 +18,7 @@ See https://simtk.org/home/pyopenmm for details"
%
include
"std_string.i"
%
include
"std_string.i"
%
include
"std_iostream.i"
%
include
"std_iostream.i"
%
include
"std_map.i"
%
include
"std_pair.i"
%
include
"std_pair.i"
%
include
"std_vector.i"
%
include
"std_vector.i"
namespace
std
{
namespace
std
{
...
@@ -28,6 +29,7 @@ namespace std {
...
@@ -28,6 +29,7 @@ namespace std {
%
template
(
vectorii
)
vector
<
vector
<
int
>
>
;
%
template
(
vectorii
)
vector
<
vector
<
int
>
>
;
%
template
(
vectorpairii
)
vector
<
pair
<
int
,
int
>
>
;
%
template
(
vectorpairii
)
vector
<
pair
<
int
,
int
>
>
;
%
template
(
vectorstring
)
vector
<
string
>
;
%
template
(
vectorstring
)
vector
<
string
>
;
%
template
(
mapstringstring
)
map
<
string
,
string
>
;
}
;
}
;
%
include
"windows.i"
%
include
"windows.i"
...
...
wrappers/python/src/swig_doxygen/swig_lib/python/pythoncode.i
View file @
12daada5
...
@@ -257,6 +257,17 @@ def stripUnits(args):
...
@@ -257,6 +257,17 @@ def stripUnits(args):
arg
=
arg
.
value_in_unit_system
(
unit
.
md_unit_system
)
arg
=
arg
.
value_in_unit_system
(
unit
.
md_unit_system
)
#
JDC
:
End
workaround
.
#
JDC
:
End
workaround
.
#
arg
=
arg
.
value_in_unit_system
(
unit
.
md_unit_system
)
#
arg
=
arg
.
value_in_unit_system
(
unit
.
md_unit_system
)
elif
isinstance
(
arg
,
dict
)
:
newArg
=
{}
for
key
in
arg
:
newKey
=
key
newValue
=
arg
[
key
]
if
not
_is_string
(
newKey
)
:
newKey
=
stripUnits
(
newKey
)
if
not
_is_string
(
newValue
)
:
newValue
=
stripUnits
(
newValue
)
newArg
[
newKey
]
=
newValue
arg
=
newArg
elif
not
_is_string
(
arg
)
:
elif
not
_is_string
(
arg
)
:
try
:
try
:
iter
(
arg
)
iter
(
arg
)
...
...
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