Ignore:
Timestamp:
Mar 19, 2014, 11:11:30 AM (11 years ago)
Author:
dmik
Message:

python: Update vendor to 2.7.6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/vendor/current/Objects/cobject.c

    r2 r388  
    1010typedef void (*destructor2)(void *, void*);
    1111
     12static int cobject_deprecation_warning(void)
     13{
     14    return PyErr_WarnPy3k("CObject type is not supported in 3.x. "
     15        "Please use capsule objects instead.", 1);
     16}
     17
     18
    1219PyObject *
    1320PyCObject_FromVoidPtr(void *cobj, void (*destr)(void *))
    1421{
    1522    PyCObject *self;
     23
     24    if (cobject_deprecation_warning()) {
     25        return NULL;
     26    }
    1627
    1728    self = PyObject_NEW(PyCObject, &PyCObject_Type);
     
    3041{
    3142    PyCObject *self;
     43
     44    if (cobject_deprecation_warning()) {
     45        return NULL;
     46    }
    3247
    3348    if (!desc) {
     
    5166{
    5267    if (self) {
     68        if (PyCapsule_CheckExact(self)) {
     69            const char *name = PyCapsule_GetName(self);
     70            return (void *)PyCapsule_GetPointer(self, name);
     71        }
    5372        if (self->ob_type == &PyCObject_Type)
    5473            return ((PyCObject *)self)->cobject;
Note: See TracChangeset for help on using the changeset viewer.