示例#1
0
文件: blame.c 项目: carlosmn/pygit2
static void
BlameIter_dealloc(BlameIter *self)
{
    Py_CLEAR(self->blame);
    PyObject_Del(self);
}
示例#2
0
static void PyTraceObject_dealloc(PyObject* self)
{
    PyObject_Del(self);
}
示例#3
0
void bbox_dealloc(PyObject* self)
{
    mylog("-%08x(%d) bbox_dealloc\n", (int)self, self->ob_refcnt);
    PyObject_Del(self);
}
示例#4
0
static void
msg_dealloc(msgobject *msgp)
{

    PyObject_Del(msgp);
}
示例#5
0
文件: tree.c 项目: ardumont/pygit2
void
TreeEntry_dealloc(TreeEntry *self)
{
    git_tree_entry_free((git_tree_entry*)self->entry);
    PyObject_Del(self);
}
示例#6
0
文件: diff.c 项目: EdgarChen/pygit2
static void
Hunk_dealloc(Hunk *self)
{
    Py_CLEAR(self->lines);
    PyObject_Del(self);
}
示例#7
0
static void
lobject_del(PyObject* self)
{
    PyObject_Del(self);
}
示例#8
0
static void em_dict_iter_dealloc(em_dict_iter_t *self)
{
    Py_DECREF(self->em_dict);
    PyObject_Del(self);
}
示例#9
0
static void int8_dealloc(PgInt8Object *v)
{
	PyObject_Del(v);
}
示例#10
0
 void Destroy(PyObject* self)
 {
     PyObject_Del(self);
 }
示例#11
0
static void ZstdCompressionWriter_dealloc(ZstdCompressionWriter* self) {
	Py_XDECREF(self->compressor);
	Py_XDECREF(self->writer);

	PyObject_Del(self);
}
示例#12
0
/* {{{ PYLIBSSH2_Sftp_dealloc
 */
static void
PYLIBSSH2_Sftp_dealloc(PYLIBSSH2_SFTP *self)
{
    PyObject_Del(self);
}
示例#13
0
文件: _pycsrch.c 项目: b45ch1/nlpy
static void Pycsrch_dealloc( PycsrchObject *self ) {

    PyObject_Del(self);
}
示例#14
0
static void
foo_dealloc(fooobject *foop)
{
    PyObject_Del(foop);
}
示例#15
0
static void
fh_dealloc(fhobject *fhp)
{
	fmfreefont(fhp->fh_fh);
	PyObject_Del(fhp);
}
示例#16
0
文件: pytdb.c 项目: AIdrifter/samba
static void tdb_iter_dealloc(PyTdbIteratorObject *self)
{
	Py_DECREF(self->iteratee);
	PyObject_Del(self);
}
示例#17
0
文件: diff.c 项目: EdgarChen/pygit2
void
DiffIter_dealloc(DiffIter *self)
{
    Py_CLEAR(self->diff);
    PyObject_Del(self);
}
示例#18
0
static void
O_dealloc(Oobject *self) {
        if (self->buf != NULL)
                free(self->buf);
        PyObject_Del(self);
}
示例#19
0
static void SampleIter_dealloc(svms_SampleIterObject *it) {
  //Py_XDECREF(it->svec);
  PyObject_Del(it);
}
示例#20
0
static void
I_dealloc(Iobject *self) {
  Py_XDECREF(self->pbuf);
  PyObject_Del(self);
}
示例#21
0
static void Connection_Destructor(Connection *self)
{
  UMConnection_Destroy(self->conn);
  PyObject_Del(self);
}
示例#22
0
static PyObject *
range_reverse(PyObject *seq)
{
    rangeobject *range = (rangeobject*) seq;
    longrangeiterobject *it;
    PyObject *one, *sum, *diff, *len = NULL, *product;
    long lstart, lstop, lstep;

    /* XXX(nnorwitz): do the calc for the new start/stop first,
        then if they fit, call the proper iter()?
    */
    assert(PyRange_Check(seq));

    /* If all three fields convert to long, use the int version */
    lstart = PyLong_AsLong(range->start);
    if (lstart != -1 || !PyErr_Occurred()) {
	lstop = PyLong_AsLong(range->stop);
	if (lstop != -1 || !PyErr_Occurred()) {
	    lstep = PyLong_AsLong(range->step);
	    if (lstep != -1 || !PyErr_Occurred()) {
		/* XXX(nnorwitz): need to check for overflow and simplify. */
		long len = get_len_of_range(lstart, lstop, lstep);
		long new_start = lstart + (len - 1) * lstep;
		long new_stop = lstart;
		if (lstep > 0)
		    new_stop -= 1;
		else
		    new_stop += 1;
		return int_range_iter(new_start, new_stop, -lstep);
	    }
	}
    }
    PyErr_Clear();

    it = PyObject_New(longrangeiterobject, &PyLongRangeIter_Type);
    if (it == NULL)
        return NULL;

    /* start + (len - 1) * step */
    len = range_length_obj(range);
    if (!len)
        goto create_failure;

    one = PyLong_FromLong(1);
    if (!one)
        goto create_failure;

    diff = PyNumber_Subtract(len, one);
    Py_DECREF(one);
    if (!diff)
        goto create_failure;

    product = PyNumber_Multiply(len, range->step);
    if (!product)
        goto create_failure;

    sum = PyNumber_Add(range->start, product);
    Py_DECREF(product);
    it->start = sum;
    if (!it->start)
        goto create_failure;
    it->step = PyNumber_Negative(range->step);
    if (!it->step) {
        Py_DECREF(it->start);
        PyObject_Del(it);
        return NULL;
    }

    /* Steal reference to len. */
    it->len = len;

    it->index = PyLong_FromLong(0);
    if (!it->index) {
        Py_DECREF(it);
        return NULL;
    }

    return (PyObject *)it;

create_failure:
    Py_XDECREF(len);
    PyObject_Del(it);
    return NULL;
}
static void
pathiter_dealloc(PycairoPathiter *it)
{
    Py_XDECREF(it->pypath);
    PyObject_Del(it);
}
示例#24
0
文件: creds.c 项目: B-Rich/smart
void creds_destroy(krb5CredsObject *self)
{
	krb5_free_cred_contents(self->context, &self->creds);
	PyObject_Del(self);
}
示例#25
0
文件: tree.c 项目: ardumont/pygit2
void
TreeIter_dealloc(TreeIter *self)
{
    Py_CLEAR(self->owner);
    PyObject_Del(self);
}
示例#26
0
文件: index.c 项目: guocb/pygit2
void
IndexIter_dealloc(IndexIter *self)
{
    Py_CLEAR(self->owner);
    PyObject_Del(self);
}
示例#27
0
 inline void dealloc(PyObject* self)
 {
   PyObject_Del(self);
 }
示例#28
0
文件: index.c 项目: guocb/pygit2
void
IndexEntry_dealloc(IndexEntry *self)
{
    PyObject_Del(self);
}
示例#29
0
void matrix_dealloc(PyObject* self)
{
    mylog("-%08x(%d) matrix_dealloc", self, self->ob_refcnt);
    PyObject_Del(self);
}
示例#30
0
static void
Xxo_dealloc(XxoObject *self)
{
    Py_XDECREF(self->x_attr);
    PyObject_Del(self);
}