Salome HOME
projects
/
modules
/
geom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix memory leaks
[modules/geom.git]
/
src
/
GEOM
/
GEOM_Function.cxx
diff --git
a/src/GEOM/GEOM_Function.cxx
b/src/GEOM/GEOM_Function.cxx
index e96a3a52cc4c39a2d9793236015ea86d7811f48b..17b45b06457c5393a651130dff16fdad539ee7b5 100644
(file)
--- a/
src/GEOM/GEOM_Function.cxx
+++ b/
src/GEOM/GEOM_Function.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
4
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
5
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-589,9
+589,10
@@
TCollection_AsciiString GEOM_Function::GetString(int thePosition)
Handle(TDataStd_Comment) aString;
TDF_Label anArgLabel = ARGUMENT(thePosition);
if(!anArgLabel.FindAttribute(TDataStd_Comment::GetID(), aString)) return aRes;
Handle(TDataStd_Comment) aString;
TDF_Label anArgLabel = ARGUMENT(thePosition);
if(!anArgLabel.FindAttribute(TDataStd_Comment::GetID(), aString)) return aRes;
-
+ char *str = new char[aString->Get().LengthOfCString()+1];
+ aString->Get().ToUTF8CString(str);
+ aRes = TCollection_AsciiString(str);
_isDone = true;
_isDone = true;
- aRes = TCollection_AsciiString(aString->Get());
return aRes;
}
return aRes;
}
@@
-982,7
+983,13
@@
void* GEOM_Function::GetCallBackData()
if(!aChild.FindAttribute(TDataStd_Comment::GetID(), aComment)) return NULL;
TCollection_AsciiString string( aComment->Get() );
if(!aChild.FindAttribute(TDataStd_Comment::GetID(), aComment)) return NULL;
TCollection_AsciiString string( aComment->Get() );
- long long address = atoll( string.ToCString() );
+ long long address;
+#ifndef WIN32
+ address = atoll ( string.ToCString() );
+#else
+ address = _strtoi64 ( string.ToCString(), NULL, 10 );
+#endif
+
return reinterpret_cast<void*> ( address );
}
return reinterpret_cast<void*> ( address );
}