X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM%2FGEOM_Function.cxx;h=17b45b06457c5393a651130dff16fdad539ee7b5;hb=58803ba33ee53a5944d565373782e5f0868c5461;hp=e96a3a52cc4c39a2d9793236015ea86d7811f48b;hpb=97c05bd172eb333540395044a41bb3e1160ffc48;p=modules%2Fgeom.git diff --git a/src/GEOM/GEOM_Function.cxx b/src/GEOM/GEOM_Function.cxx index e96a3a52c..17b45b064 100644 --- a/src/GEOM/GEOM_Function.cxx +++ b/src/GEOM/GEOM_Function.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2015 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 @@ -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; - + char *str = new char[aString->Get().LengthOfCString()+1]; + aString->Get().ToUTF8CString(str); + aRes = TCollection_AsciiString(str); _isDone = true; - aRes = TCollection_AsciiString(aString->Get()); return aRes; } @@ -982,7 +983,13 @@ void* GEOM_Function::GetCallBackData() 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 ( address ); }