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
21bf9597
Commit
21bf9597
authored
Jan 12, 2015
by
Robert McGibbon
Browse files
might fix segfault
parent
4b33803e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
wrappers/python/src/swig_doxygen/swig_lib/python/typemaps.i
wrappers/python/src/swig_doxygen/swig_lib/python/typemaps.i
+3
-3
No files found.
wrappers/python/src/swig_doxygen/swig_lib/python/typemaps.i
View file @
21bf9597
...
@@ -169,7 +169,7 @@
...
@@ -169,7 +169,7 @@
$
result
=
PyBytes_FromStringAndSize
(
$
1.
c_str
(),
$
1.
length
())
;
$
result
=
PyBytes_FromStringAndSize
(
$
1.
c_str
(),
$
1.
length
())
;
}
}
%
typemap
(
in
)
const
std
::
string
&
{
%
typemap
(
in
)
const
std
::
string
&
(
std
::
string
temp2
)
{
// if we have a C++ method that takes in a std::string, we're most happy to
// if we have a C++ method that takes in a std::string, we're most happy to
// accept a python bytes object. But if the user passes in a unicode object
// accept a python bytes object. But if the user passes in a unicode object
// we'll try to recover by encoding it to UTF-8 bytes
// we'll try to recover by encoding it to UTF-8 bytes
...
@@ -194,10 +194,10 @@
...
@@ -194,10 +194,10 @@
SWIG_exception_fail
(
SWIG_TypeError
,
"$symname: argument must be str or bytes"
)
;
SWIG_exception_fail
(
SWIG_TypeError
,
"$symname: argument must be str or bytes"
)
;
}
}
std
::
string
temp2
(
c_str
,
len
)
;
temp2
=
std
::
string
(
c_str
,
len
)
;
$
1
=
&
temp2;
$
1
=
&
temp2;
}
}
%
typemap
(
freearg
)
const
std
::
string
&
{
%
typemap
(
freearg
)
const
std
::
string
&
{
//
Don't delete me
//
pass
}
}
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