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
a2c68a6f
Commit
a2c68a6f
authored
Feb 05, 2014
by
peastman
Browse files
Merge pull request #319 from swails/master
Fix segfaults in GCC when using the C-API
parents
a6524f94
fd1bb3d2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
plugins/amoeba/wrappers/generateAmoebaWrappers.py
plugins/amoeba/wrappers/generateAmoebaWrappers.py
+2
-0
wrappers/generateWrappers.py
wrappers/generateWrappers.py
+2
-0
No files found.
plugins/amoeba/wrappers/generateAmoebaWrappers.py
View file @
a2c68a6f
...
...
@@ -550,6 +550,8 @@ class CSourceGenerator(WrapperGenerator):
unwrappedType
=
type
[:
-
1
].
strip
()
if
unwrappedType
in
self
.
classesByShortName
:
unwrappedType
=
self
.
classesByShortName
[
unwrappedType
]
if
unwrappedType
==
'const std::string'
:
return
'std::string(%s)'
%
value
return
'*'
+
self
.
unwrapValue
(
unwrappedType
+
'*'
,
value
)
if
type
in
self
.
classesByShortName
:
return
'static_cast<%s>(%s)'
%
(
self
.
classesByShortName
[
type
],
value
)
...
...
wrappers/generateWrappers.py
View file @
a2c68a6f
...
...
@@ -624,6 +624,8 @@ class CSourceGenerator(WrapperGenerator):
unwrappedType
=
type
[:
-
1
].
strip
()
if
unwrappedType
in
self
.
classesByShortName
:
unwrappedType
=
self
.
classesByShortName
[
unwrappedType
]
if
unwrappedType
==
'const std::string'
:
return
'std::string(%s)'
%
value
return
'*'
+
self
.
unwrapValue
(
unwrappedType
+
'*'
,
value
)
if
type
in
self
.
classesByShortName
:
return
'static_cast<%s>(%s)'
%
(
self
.
classesByShortName
[
type
],
value
)
...
...
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