~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Objects/weakrefobject.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
433
433
        return generic(proxy, v, w); \
434
434
    }
435
435
 
 
436
#define WRAP_METHOD(method, special) \
 
437
    static PyObject * \
 
438
    method(PyObject *proxy) { \
 
439
            UNWRAP(proxy); \
 
440
                return PyObject_CallMethod(proxy, special, ""); \
 
441
        }
 
442
 
436
443
 
437
444
/* direct slots */
438
445
 
593
600
}
594
601
 
595
602
 
 
603
WRAP_METHOD(proxy_unicode, "__unicode__");
 
604
 
 
605
 
 
606
static PyMethodDef proxy_methods[] = {
 
607
        {"__unicode__", (PyCFunction)proxy_unicode, METH_NOARGS},
 
608
        {NULL, NULL}
 
609
};
 
610
 
 
611
 
596
612
static PyNumberMethods proxy_as_number = {
597
613
    proxy_add,              /*nb_add*/
598
614
    proxy_sub,              /*nb_subtract*/
684
700
    0,                                  /* tp_weaklistoffset */
685
701
    (getiterfunc)proxy_iter,            /* tp_iter */
686
702
    (iternextfunc)proxy_iternext,       /* tp_iternext */
 
703
        proxy_methods,                      /* tp_methods */
687
704
};
688
705
 
689
706