More fix for warnings, and add some of the ideas of the Bill's 'labels' patch
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6998 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4a72bb83c7
commit
192e00615d
18 changed files with 177 additions and 141 deletions
|
|
@ -51,7 +51,7 @@ namespace std
|
|||
|
||||
%fragment(SWIG_From_frag(std::string),"header",
|
||||
fragment="SWIG_FromCharArray") {
|
||||
SWIGINTERNSHORT PyObject*
|
||||
SWIGINTERNINLINE PyObject*
|
||||
SWIG_From(std::string)(const std::string& s)
|
||||
{
|
||||
return SWIG_FromCharArray(s.data(), s.size());
|
||||
|
|
@ -65,7 +65,7 @@ SWIGINTERN int
|
|||
{
|
||||
std::string* s;
|
||||
int res = SWIG_AsPtr(std::string)(obj, &s);
|
||||
if (res && s) {
|
||||
if ((res != 0) && s) {
|
||||
if (val) *val = *s;
|
||||
if (res == SWIG_NEWOBJ) delete s;
|
||||
return res;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue