-// Copyright (C) 2006-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2006-2022 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include "TypeCode.hxx"
#include "Cstr2d.hxx"
#include "SALOME_GenericObj.hh"
+#include "PythonNode.hxx"
#include <iostream>
#include <iomanip>
{
namespace ENGINE
{
- void printbin(const std::string& bin)
- {
- register char c;
- for(int i=0;i<bin.length();i++)
- {
- c=bin[i];
- if (c < ' ' || c >= 0x7f)
- {
- fprintf(stderr,"\\x%02x",c & 0xff);
- }
- else
- fprintf(stderr,"%c",c);
- }
- fprintf(stderr,"\n");
- }
-
std::string getImplName(ImplType impl)
{
switch(impl)
}
if(strncmp(t->id(),"python",6)==0)
{
+ bool somthingToDo = YACS::ENGINE::PythonEntry::GetDestroyStatus(o);
+ if( somthingToDo )
+ YACS::ENGINE::PythonEntry::DoNotTouchFileIfProxy(o);
// It's a native Python object pickle it
PyObject* mod=PyImport_ImportModule("pickle");
PyObject *pickled=PyObject_CallMethod(mod,(char *)"dumps",(char *)"Oi",o,protocol);
+ if( somthingToDo )
+ YACS::ENGINE::PythonEntry::UnlinkOnDestructorIfProxy(o);
DEBTRACE(PyObject_Repr(pickled) );
Py_DECREF(mod);
if(pickled==NULL)