Esempio n. 1
0
static PyObject * null_wrapper(PyObject * self, PyOperation * o)
{
    if (PyOperation_Check(o)) {
#ifdef CYPHESIS_DEBUG
        o->operation = Atlas::Objects::Operation::RootOperation(0);
#endif // NDEBUG
    } else if (PyOplist_Check(o)) {
#ifdef CYPHESIS_DEBUG
        ((PyOplist*)o)->ops = 0;
#endif // NDEBUG
    } else if (PyRootEntity_Check(o)) {
#ifdef CYPHESIS_DEBUG
        ((PyRootEntity*)o)->entity = Atlas::Objects::Entity::RootEntity(0);
#endif // NDEBUG
    } else if (PyMessage_Check(o)) {
#ifdef CYPHESIS_DEBUG
        ((PyMessage*)o)->m_obj = 0;
#endif // NDEBUG
    } else {
        PyErr_SetString(PyExc_TypeError, "Unknown Object type");
        return NULL;
    }
    Py_INCREF(Py_None);
    return Py_None;
}
Esempio n. 2
0
static PyObject * null_wrapper(PyObject * self, PyRootEntity * o)
{
    if (!PyRootEntity_Check(o)) {
        PyErr_SetString(PyExc_TypeError, "Unknown Object type");
        return NULL;
    }
#ifdef CYPHESIS_DEBUG
    o->entity = Atlas::Objects::Entity::RootEntity(0);
#endif // NDEBUG
    Py_INCREF(Py_None);
    return Py_None;
}