Example #1
0
static int
CTracer_init(CTracer *self, PyObject *args_unused, PyObject *kwds_unused)
{
    int ret = RET_ERROR;
    PyObject * weakref = NULL;

    if (DataStack_init(&self->stats, &self->data_stack) < 0) {
        goto error;
    }

    weakref = PyImport_ImportModule("weakref");
    if (weakref == NULL) {
        goto error;
    }
    STATS( self->stats.pycalls++; )
Example #2
0
static int
CTracer_init(CTracer *self, PyObject *args_unused, PyObject *kwds_unused)
{
    int ret = RET_ERROR;

    if (DataStack_init(&self->stats, &self->data_stack) < 0) {
        goto error;
    }

    self->pdata_stack = &self->data_stack;

    self->context = Py_None;
    Py_INCREF(self->context);

    ret = RET_OK;
    goto ok;

error:
    STATS( self->stats.errors++; )