// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributePythonObject_i.hxx"
#include <TCollection_ExtendedString.hxx>
#include <TColStd_HArray1OfCharacter.hxx>
-#include "SALOMEDS_SObject_i.hxx"
+
+using namespace std;
void SALOMEDS_AttributePythonObject_i::SetObject(const char* theSequence, CORBA::Boolean IsScript) {
CheckLocked();
- char *aSeq = CORBA::string_dup(theSequence);
- Handle(SALOMEDS_PythonObjectAttribute)::DownCast(_myAttr)->SetObject(aSeq, IsScript);
+ Handle(SALOMEDS_PythonObjectAttribute)::DownCast(_myAttr)->SetObject(const_cast<char*>(theSequence), IsScript);
}
char* SALOMEDS_AttributePythonObject_i::GetObject() {
return aResult;
}
-void SALOMEDS_AttributePythonObject_i::Restore(const char* value) {
- char* aString = strdup(value);
- SetObject(aString + 1, aString[0]=='s');
+void SALOMEDS_AttributePythonObject_i::Restore(const char* theValue) {
+ SetObject(&theValue[1], theValue[0]=='s');
}