Updated (and regenerated) for name change in tp_init method arguments:

they are now _self, _args and _kwds.
This commit is contained in:
Jack Jansen 2005-07-03 20:59:44 +00:00
parent a6af76cbe4
commit 918a9e2f63
29 changed files with 1790 additions and 1779 deletions

View File

@ -64,6 +64,7 @@ PyObject *AEDesc_New(AEDesc *itself)
it->ob_owned = 1;
return (PyObject *)it;
}
int AEDesc_Convert(PyObject *v, AEDesc *p_itself)
{
if (!AEDesc_Check(v))
@ -863,16 +864,16 @@ static PyGetSetDef AEDesc_getsetlist[] = {
#define AEDesc_tp_alloc PyType_GenericAlloc
static PyObject *AEDesc_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *AEDesc_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
AEDesc itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, AEDesc_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((AEDescObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, AEDesc_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((AEDescObject *)_self)->ob_itself = itself;
return _self;
}
#define AEDesc_tp_free PyObject_Del

View File

@ -45,6 +45,7 @@ PyObject *ThemeDrawingStateObj_New(ThemeDrawingState itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int ThemeDrawingStateObj_Convert(PyObject *v, ThemeDrawingState *p_itself)
{
if (!ThemeDrawingStateObj_Check(v))
@ -115,16 +116,16 @@ static PyMethodDef ThemeDrawingStateObj_methods[] = {
#define ThemeDrawingStateObj_tp_alloc PyType_GenericAlloc
static PyObject *ThemeDrawingStateObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *ThemeDrawingStateObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
ThemeDrawingState itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, ThemeDrawingStateObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((ThemeDrawingStateObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, ThemeDrawingStateObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((ThemeDrawingStateObject *)_self)->ob_itself = itself;
return _self;
}
#define ThemeDrawingStateObj_tp_free PyObject_Del

View File

@ -136,6 +136,7 @@ PyObject *EventRef_New(EventRef itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int EventRef_Convert(PyObject *v, EventRef *p_itself)
{
if (!EventRef_Check(v))
@ -399,16 +400,16 @@ static PyMethodDef EventRef_methods[] = {
#define EventRef_tp_alloc PyType_GenericAlloc
static PyObject *EventRef_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *EventRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
EventRef itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, EventRef_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((EventRefObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, EventRef_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((EventRefObject *)_self)->ob_itself = itself;
return _self;
}
#define EventRef_tp_free PyObject_Del
@ -480,6 +481,7 @@ PyObject *EventQueueRef_New(EventQueueRef itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int EventQueueRef_Convert(PyObject *v, EventQueueRef *p_itself)
{
if (!EventQueueRef_Check(v))
@ -619,16 +621,16 @@ static PyMethodDef EventQueueRef_methods[] = {
#define EventQueueRef_tp_alloc PyType_GenericAlloc
static PyObject *EventQueueRef_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *EventQueueRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
EventQueueRef itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, EventQueueRef_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((EventQueueRefObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, EventQueueRef_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((EventQueueRefObject *)_self)->ob_itself = itself;
return _self;
}
#define EventQueueRef_tp_free PyObject_Del
@ -700,6 +702,7 @@ PyObject *EventLoopRef_New(EventLoopRef itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int EventLoopRef_Convert(PyObject *v, EventLoopRef *p_itself)
{
if (!EventLoopRef_Check(v))
@ -748,16 +751,16 @@ static PyMethodDef EventLoopRef_methods[] = {
#define EventLoopRef_tp_alloc PyType_GenericAlloc
static PyObject *EventLoopRef_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *EventLoopRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
EventLoopRef itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, EventLoopRef_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((EventLoopRefObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, EventLoopRef_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((EventLoopRefObject *)_self)->ob_itself = itself;
return _self;
}
#define EventLoopRef_tp_free PyObject_Del
@ -829,6 +832,7 @@ PyObject *EventLoopTimerRef_New(EventLoopTimerRef itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int EventLoopTimerRef_Convert(PyObject *v, EventLoopTimerRef *p_itself)
{
if (!EventLoopTimerRef_Check(v))
@ -895,16 +899,16 @@ static PyMethodDef EventLoopTimerRef_methods[] = {
#define EventLoopTimerRef_tp_alloc PyType_GenericAlloc
static PyObject *EventLoopTimerRef_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *EventLoopTimerRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
EventLoopTimerRef itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, EventLoopTimerRef_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((EventLoopTimerRefObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, EventLoopTimerRef_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((EventLoopTimerRefObject *)_self)->ob_itself = itself;
return _self;
}
#define EventLoopTimerRef_tp_free PyObject_Del
@ -978,6 +982,7 @@ PyObject *EventHandlerRef_New(EventHandlerRef itself)
it->ob_callback = NULL;
return (PyObject *)it;
}
int EventHandlerRef_Convert(PyObject *v, EventHandlerRef *p_itself)
{
if (!EventHandlerRef_Check(v))
@ -1087,16 +1092,16 @@ static PyMethodDef EventHandlerRef_methods[] = {
#define EventHandlerRef_tp_alloc PyType_GenericAlloc
static PyObject *EventHandlerRef_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *EventHandlerRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
EventHandlerRef itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, EventHandlerRef_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((EventHandlerRefObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, EventHandlerRef_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((EventHandlerRefObject *)_self)->ob_itself = itself;
return _self;
}
#define EventHandlerRef_tp_free PyObject_Del
@ -1168,6 +1173,7 @@ PyObject *EventHandlerCallRef_New(EventHandlerCallRef itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int EventHandlerCallRef_Convert(PyObject *v, EventHandlerCallRef *p_itself)
{
if (!EventHandlerCallRef_Check(v))
@ -1219,16 +1225,16 @@ static PyMethodDef EventHandlerCallRef_methods[] = {
#define EventHandlerCallRef_tp_alloc PyType_GenericAlloc
static PyObject *EventHandlerCallRef_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *EventHandlerCallRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
EventHandlerCallRef itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, EventHandlerCallRef_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((EventHandlerCallRefObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, EventHandlerCallRef_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((EventHandlerCallRefObject *)_self)->ob_itself = itself;
return _self;
}
#define EventHandlerCallRef_tp_free PyObject_Del
@ -1300,6 +1306,7 @@ PyObject *EventTargetRef_New(EventTargetRef itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int EventTargetRef_Convert(PyObject *v, EventTargetRef *p_itself)
{
if (!EventTargetRef_Check(v))
@ -1373,16 +1380,16 @@ static PyMethodDef EventTargetRef_methods[] = {
#define EventTargetRef_tp_alloc PyType_GenericAlloc
static PyObject *EventTargetRef_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *EventTargetRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
EventTargetRef itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, EventTargetRef_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((EventTargetRefObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, EventTargetRef_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((EventTargetRefObject *)_self)->ob_itself = itself;
return _self;
}
#define EventTargetRef_tp_free PyObject_Del
@ -1454,6 +1461,7 @@ PyObject *EventHotKeyRef_New(EventHotKeyRef itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int EventHotKeyRef_Convert(PyObject *v, EventHotKeyRef *p_itself)
{
if (!EventHotKeyRef_Check(v))
@ -1502,16 +1510,16 @@ static PyMethodDef EventHotKeyRef_methods[] = {
#define EventHotKeyRef_tp_alloc PyType_GenericAlloc
static PyObject *EventHotKeyRef_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *EventHotKeyRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
EventHotKeyRef itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, EventHotKeyRef_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((EventHotKeyRefObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, EventHotKeyRef_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((EventHotKeyRefObject *)_self)->ob_itself = itself;
return _self;
}
#define EventHotKeyRef_tp_free PyObject_Del

View File

@ -138,6 +138,7 @@ PyObject *CFTypeRefObj_New(CFTypeRef itself)
it->ob_freeit = CFRelease;
return (PyObject *)it;
}
int CFTypeRefObj_Convert(PyObject *v, CFTypeRef *p_itself)
{
@ -399,14 +400,14 @@ static int CFTypeRefObj_hash(CFTypeRefObject *self)
/* XXXX Or should we use CFHash?? */
return (int)self->ob_itself;
}
static int CFTypeRefObj_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
static int CFTypeRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
CFTypeRef itself;
char *kw[] = {"itself", 0};
if (PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
{
((CFTypeRefObject *)self)->ob_itself = itself;
((CFTypeRefObject *)_self)->ob_itself = itself;
return 0;
}
return -1;
@ -414,7 +415,7 @@ static int CFTypeRefObj_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
#define CFTypeRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CFTypeRefObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *CFTypeRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
@ -500,6 +501,7 @@ PyObject *CFArrayRefObj_New(CFArrayRef itself)
it->ob_freeit = CFRelease;
return (PyObject *)it;
}
int CFArrayRefObj_Convert(PyObject *v, CFArrayRef *p_itself)
{
@ -602,21 +604,21 @@ static int CFArrayRefObj_hash(CFArrayRefObject *self)
/* XXXX Or should we use CFHash?? */
return (int)self->ob_itself;
}
static int CFArrayRefObj_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
static int CFArrayRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
CFArrayRef itself;
char *kw[] = {"itself", 0};
if (PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CFArrayRefObj_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFArrayRefObj_Convert, &itself))
{
((CFArrayRefObject *)self)->ob_itself = itself;
((CFArrayRefObject *)_self)->ob_itself = itself;
return 0;
}
/* Any CFTypeRef descendent is allowed as initializer too */
if (PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
{
((CFArrayRefObject *)self)->ob_itself = itself;
((CFArrayRefObject *)_self)->ob_itself = itself;
return 0;
}
return -1;
@ -624,7 +626,7 @@ static int CFArrayRefObj_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
#define CFArrayRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CFArrayRefObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *CFArrayRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
@ -710,6 +712,7 @@ PyObject *CFMutableArrayRefObj_New(CFMutableArrayRef itself)
it->ob_freeit = CFRelease;
return (PyObject *)it;
}
int CFMutableArrayRefObj_Convert(PyObject *v, CFMutableArrayRef *p_itself)
{
@ -841,21 +844,21 @@ static int CFMutableArrayRefObj_hash(CFMutableArrayRefObject *self)
/* XXXX Or should we use CFHash?? */
return (int)self->ob_itself;
}
static int CFMutableArrayRefObj_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
static int CFMutableArrayRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
CFMutableArrayRef itself;
char *kw[] = {"itself", 0};
if (PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CFMutableArrayRefObj_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFMutableArrayRefObj_Convert, &itself))
{
((CFMutableArrayRefObject *)self)->ob_itself = itself;
((CFMutableArrayRefObject *)_self)->ob_itself = itself;
return 0;
}
/* Any CFTypeRef descendent is allowed as initializer too */
if (PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
{
((CFMutableArrayRefObject *)self)->ob_itself = itself;
((CFMutableArrayRefObject *)_self)->ob_itself = itself;
return 0;
}
return -1;
@ -863,7 +866,7 @@ static int CFMutableArrayRefObj_tp_init(PyObject *self, PyObject *args, PyObject
#define CFMutableArrayRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CFMutableArrayRefObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *CFMutableArrayRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
@ -949,6 +952,7 @@ PyObject *CFDictionaryRefObj_New(CFDictionaryRef itself)
it->ob_freeit = CFRelease;
return (PyObject *)it;
}
int CFDictionaryRefObj_Convert(PyObject *v, CFDictionaryRef *p_itself)
{
@ -1033,21 +1037,21 @@ static int CFDictionaryRefObj_hash(CFDictionaryRefObject *self)
/* XXXX Or should we use CFHash?? */
return (int)self->ob_itself;
}
static int CFDictionaryRefObj_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
static int CFDictionaryRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
CFDictionaryRef itself;
char *kw[] = {"itself", 0};
if (PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CFDictionaryRefObj_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFDictionaryRefObj_Convert, &itself))
{
((CFDictionaryRefObject *)self)->ob_itself = itself;
((CFDictionaryRefObject *)_self)->ob_itself = itself;
return 0;
}
/* Any CFTypeRef descendent is allowed as initializer too */
if (PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
{
((CFDictionaryRefObject *)self)->ob_itself = itself;
((CFDictionaryRefObject *)_self)->ob_itself = itself;
return 0;
}
return -1;
@ -1055,7 +1059,7 @@ static int CFDictionaryRefObj_tp_init(PyObject *self, PyObject *args, PyObject *
#define CFDictionaryRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CFDictionaryRefObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *CFDictionaryRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
@ -1141,6 +1145,7 @@ PyObject *CFMutableDictionaryRefObj_New(CFMutableDictionaryRef itself)
it->ob_freeit = CFRelease;
return (PyObject *)it;
}
int CFMutableDictionaryRefObj_Convert(PyObject *v, CFMutableDictionaryRef *p_itself)
{
@ -1209,21 +1214,21 @@ static int CFMutableDictionaryRefObj_hash(CFMutableDictionaryRefObject *self)
/* XXXX Or should we use CFHash?? */
return (int)self->ob_itself;
}
static int CFMutableDictionaryRefObj_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
static int CFMutableDictionaryRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
CFMutableDictionaryRef itself;
char *kw[] = {"itself", 0};
if (PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CFMutableDictionaryRefObj_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFMutableDictionaryRefObj_Convert, &itself))
{
((CFMutableDictionaryRefObject *)self)->ob_itself = itself;
((CFMutableDictionaryRefObject *)_self)->ob_itself = itself;
return 0;
}
/* Any CFTypeRef descendent is allowed as initializer too */
if (PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
{
((CFMutableDictionaryRefObject *)self)->ob_itself = itself;
((CFMutableDictionaryRefObject *)_self)->ob_itself = itself;
return 0;
}
return -1;
@ -1231,7 +1236,7 @@ static int CFMutableDictionaryRefObj_tp_init(PyObject *self, PyObject *args, PyO
#define CFMutableDictionaryRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CFMutableDictionaryRefObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *CFMutableDictionaryRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
@ -1317,6 +1322,7 @@ PyObject *CFDataRefObj_New(CFDataRef itself)
it->ob_freeit = CFRelease;
return (PyObject *)it;
}
int CFDataRefObj_Convert(PyObject *v, CFDataRef *p_itself)
{
@ -1439,21 +1445,21 @@ static int CFDataRefObj_hash(CFDataRefObject *self)
/* XXXX Or should we use CFHash?? */
return (int)self->ob_itself;
}
static int CFDataRefObj_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
static int CFDataRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
CFDataRef itself;
char *kw[] = {"itself", 0};
if (PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CFDataRefObj_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFDataRefObj_Convert, &itself))
{
((CFDataRefObject *)self)->ob_itself = itself;
((CFDataRefObject *)_self)->ob_itself = itself;
return 0;
}
/* Any CFTypeRef descendent is allowed as initializer too */
if (PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
{
((CFDataRefObject *)self)->ob_itself = itself;
((CFDataRefObject *)_self)->ob_itself = itself;
return 0;
}
return -1;
@ -1461,7 +1467,7 @@ static int CFDataRefObj_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
#define CFDataRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CFDataRefObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *CFDataRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
@ -1547,6 +1553,7 @@ PyObject *CFMutableDataRefObj_New(CFMutableDataRef itself)
it->ob_freeit = CFRelease;
return (PyObject *)it;
}
int CFMutableDataRefObj_Convert(PyObject *v, CFMutableDataRef *p_itself)
{
@ -1703,21 +1710,21 @@ static int CFMutableDataRefObj_hash(CFMutableDataRefObject *self)
/* XXXX Or should we use CFHash?? */
return (int)self->ob_itself;
}
static int CFMutableDataRefObj_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
static int CFMutableDataRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
CFMutableDataRef itself;
char *kw[] = {"itself", 0};
if (PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CFMutableDataRefObj_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFMutableDataRefObj_Convert, &itself))
{
((CFMutableDataRefObject *)self)->ob_itself = itself;
((CFMutableDataRefObject *)_self)->ob_itself = itself;
return 0;
}
/* Any CFTypeRef descendent is allowed as initializer too */
if (PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
{
((CFMutableDataRefObject *)self)->ob_itself = itself;
((CFMutableDataRefObject *)_self)->ob_itself = itself;
return 0;
}
return -1;
@ -1725,7 +1732,7 @@ static int CFMutableDataRefObj_tp_init(PyObject *self, PyObject *args, PyObject
#define CFMutableDataRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CFMutableDataRefObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *CFMutableDataRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
@ -1811,6 +1818,7 @@ PyObject *CFStringRefObj_New(CFStringRef itself)
it->ob_freeit = CFRelease;
return (PyObject *)it;
}
int CFStringRefObj_Convert(PyObject *v, CFStringRef *p_itself)
{
@ -2444,21 +2452,21 @@ static int CFStringRefObj_hash(CFStringRefObject *self)
/* XXXX Or should we use CFHash?? */
return (int)self->ob_itself;
}
static int CFStringRefObj_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
static int CFStringRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
CFStringRef itself;
char *kw[] = {"itself", 0};
if (PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CFStringRefObj_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFStringRefObj_Convert, &itself))
{
((CFStringRefObject *)self)->ob_itself = itself;
((CFStringRefObject *)_self)->ob_itself = itself;
return 0;
}
/* Any CFTypeRef descendent is allowed as initializer too */
if (PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
{
((CFStringRefObject *)self)->ob_itself = itself;
((CFStringRefObject *)_self)->ob_itself = itself;
return 0;
}
return -1;
@ -2466,7 +2474,7 @@ static int CFStringRefObj_tp_init(PyObject *self, PyObject *args, PyObject *kwds
#define CFStringRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CFStringRefObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *CFStringRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
@ -2552,6 +2560,7 @@ PyObject *CFMutableStringRefObj_New(CFMutableStringRef itself)
it->ob_freeit = CFRelease;
return (PyObject *)it;
}
int CFMutableStringRefObj_Convert(PyObject *v, CFMutableStringRef *p_itself)
{
@ -2831,21 +2840,21 @@ static int CFMutableStringRefObj_hash(CFMutableStringRefObject *self)
/* XXXX Or should we use CFHash?? */
return (int)self->ob_itself;
}
static int CFMutableStringRefObj_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
static int CFMutableStringRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
CFMutableStringRef itself;
char *kw[] = {"itself", 0};
if (PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CFMutableStringRefObj_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFMutableStringRefObj_Convert, &itself))
{
((CFMutableStringRefObject *)self)->ob_itself = itself;
((CFMutableStringRefObject *)_self)->ob_itself = itself;
return 0;
}
/* Any CFTypeRef descendent is allowed as initializer too */
if (PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
{
((CFMutableStringRefObject *)self)->ob_itself = itself;
((CFMutableStringRefObject *)_self)->ob_itself = itself;
return 0;
}
return -1;
@ -2853,7 +2862,7 @@ static int CFMutableStringRefObj_tp_init(PyObject *self, PyObject *args, PyObjec
#define CFMutableStringRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CFMutableStringRefObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *CFMutableStringRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
@ -2939,6 +2948,7 @@ PyObject *CFURLRefObj_New(CFURLRef itself)
it->ob_freeit = CFRelease;
return (PyObject *)it;
}
int CFURLRefObj_Convert(PyObject *v, CFURLRef *p_itself)
{
@ -3482,21 +3492,21 @@ static int CFURLRefObj_hash(CFURLRefObject *self)
/* XXXX Or should we use CFHash?? */
return (int)self->ob_itself;
}
static int CFURLRefObj_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
static int CFURLRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
CFURLRef itself;
char *kw[] = {"itself", 0};
if (PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CFURLRefObj_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFURLRefObj_Convert, &itself))
{
((CFURLRefObject *)self)->ob_itself = itself;
((CFURLRefObject *)_self)->ob_itself = itself;
return 0;
}
/* Any CFTypeRef descendent is allowed as initializer too */
if (PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
{
((CFURLRefObject *)self)->ob_itself = itself;
((CFURLRefObject *)_self)->ob_itself = itself;
return 0;
}
return -1;
@ -3504,7 +3514,7 @@ static int CFURLRefObj_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
#define CFURLRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CFURLRefObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *CFURLRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;

View File

@ -315,18 +315,18 @@ class MyGlobalObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
Output("%s itself;", self.itselftype)
Output("char *kw[] = {\"itself\", 0};")
Output()
Output("if (PyArg_ParseTupleAndKeywords(args, kwds, \"O&\", kw, %s_Convert, &itself))",
Output("if (PyArg_ParseTupleAndKeywords(_args, _kwds, \"O&\", kw, %s_Convert, &itself))",
self.prefix)
OutLbrace()
Output("((%s *)self)->ob_itself = itself;", self.objecttype)
Output("((%s *)_self)->ob_itself = itself;", self.objecttype)
Output("return 0;")
OutRbrace()
if self.prefix != 'CFTypeRefObj':
Output()
Output("/* Any CFTypeRef descendent is allowed as initializer too */")
Output("if (PyArg_ParseTupleAndKeywords(args, kwds, \"O&\", kw, CFTypeRefObj_Convert, &itself))")
Output("if (PyArg_ParseTupleAndKeywords(_args, _kwds, \"O&\", kw, CFTypeRefObj_Convert, &itself))")
OutLbrace()
Output("((%s *)self)->ob_itself = itself;", self.objecttype)
Output("((%s *)_self)->ob_itself = itself;", self.objecttype)
Output("return 0;")
OutRbrace()
Output("return -1;")

View File

@ -110,6 +110,7 @@ PyObject *CGContextRefObj_New(CGContextRef itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int CGContextRefObj_Convert(PyObject *v, CGContextRef *p_itself)
{
if (!CGContextRefObj_Check(v))
@ -1191,16 +1192,16 @@ static PyMethodDef CGContextRefObj_methods[] = {
#define CGContextRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CGContextRefObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *CGContextRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
CGContextRef itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CGContextRefObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((CGContextRefObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CGContextRefObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((CGContextRefObject *)_self)->ob_itself = itself;
return _self;
}
#define CGContextRefObj_tp_free PyObject_Del

View File

@ -79,6 +79,7 @@ PyObject *CmpInstObj_New(ComponentInstance itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int CmpInstObj_Convert(PyObject *v, ComponentInstance *p_itself)
{
if (!CmpInstObj_Check(v))
@ -260,16 +261,16 @@ static PyMethodDef CmpInstObj_methods[] = {
#define CmpInstObj_tp_alloc PyType_GenericAlloc
static PyObject *CmpInstObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *CmpInstObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
ComponentInstance itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CmpInstObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((ComponentInstanceObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CmpInstObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((ComponentInstanceObject *)_self)->ob_itself = itself;
return _self;
}
#define CmpInstObj_tp_free PyObject_Del
@ -346,6 +347,7 @@ PyObject *CmpObj_New(Component itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int CmpObj_Convert(PyObject *v, Component *p_itself)
{
if ( v == Py_None ) {
@ -693,16 +695,16 @@ static PyMethodDef CmpObj_methods[] = {
#define CmpObj_tp_alloc PyType_GenericAlloc
static PyObject *CmpObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *CmpObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
Component itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CmpObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((ComponentObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CmpObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((ComponentObject *)_self)->ob_itself = itself;
return _self;
}
#define CmpObj_tp_free PyObject_Del

View File

@ -154,6 +154,7 @@ PyObject *CtlObj_New(ControlHandle itself)
it->ob_callbackdict = NULL;
return (PyObject *)it;
}
int CtlObj_Convert(PyObject *v, ControlHandle *p_itself)
{
if (!CtlObj_Check(v))
@ -3848,16 +3849,16 @@ static long CtlObj_hash(ControlObject *self)
#define CtlObj_tp_alloc PyType_GenericAlloc
static PyObject *CtlObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *CtlObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
ControlHandle itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CtlObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((ControlObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CtlObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((ControlObject *)_self)->ob_itself = itself;
return _self;
}
#define CtlObj_tp_free PyObject_Del

View File

@ -146,6 +146,7 @@ PyObject *DlgObj_New(DialogPtr itself)
SetWRefCon(GetDialogWindow(itself), (long)it);
return (PyObject *)it;
}
int DlgObj_Convert(PyObject *v, DialogPtr *p_itself)
{
if (v == Py_None) { *p_itself = NULL; return 1; }
@ -958,16 +959,16 @@ static int DlgObj_hash(DialogObject *self)
#define DlgObj_tp_alloc PyType_GenericAlloc
static PyObject *DlgObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *DlgObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
DialogPtr itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, DlgObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((DialogObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, DlgObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((DialogObject *)_self)->ob_itself = itself;
return _self;
}
#define DlgObj_tp_free PyObject_Del

View File

@ -61,6 +61,7 @@ PyObject *DragObj_New(DragRef itself)
it->sendproc = NULL;
return (PyObject *)it;
}
int DragObj_Convert(PyObject *v, DragRef *p_itself)
{
if (!DragObj_Check(v))
@ -743,16 +744,16 @@ static PyMethodDef DragObj_methods[] = {
#define DragObj_tp_alloc PyType_GenericAlloc
static PyObject *DragObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *DragObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
DragRef itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, DragObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((DragObjObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, DragObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((DragObjObject *)_self)->ob_itself = itself;
return _self;
}
#define DragObj_tp_free PyObject_Del

View File

@ -114,6 +114,7 @@ static PyObject *FSCatalogInfo_New(FSCatalogInfo *itself)
it->ob_itself = *itself;
return (PyObject *)it;
}
static int FSCatalogInfo_Convert(PyObject *v, FSCatalogInfo *p_itself)
{
if (!FSCatalogInfo_Check(v))
@ -349,7 +350,7 @@ static PyGetSetDef FSCatalogInfo_getsetlist[] = {
#define FSCatalogInfo_repr NULL
#define FSCatalogInfo_hash NULL
static int FSCatalogInfo_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
static int FSCatalogInfo_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
static char *kw[] = {
"nodeFlags",
@ -370,22 +371,22 @@ static int FSCatalogInfo_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
"userPrivileges"
, 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|HhllO&O&O&O&O&llllllb", kw, &((FSCatalogInfoObject *)self)->ob_itself.nodeFlags,
&((FSCatalogInfoObject *)self)->ob_itself.volume,
&((FSCatalogInfoObject *)self)->ob_itself.parentDirID,
&((FSCatalogInfoObject *)self)->ob_itself.nodeID,
UTCDateTime_Convert, &((FSCatalogInfoObject *)self)->ob_itself.createDate,
UTCDateTime_Convert, &((FSCatalogInfoObject *)self)->ob_itself.contentModDate,
UTCDateTime_Convert, &((FSCatalogInfoObject *)self)->ob_itself.attributeModDate,
UTCDateTime_Convert, &((FSCatalogInfoObject *)self)->ob_itself.accessDate,
UTCDateTime_Convert, &((FSCatalogInfoObject *)self)->ob_itself.backupDate,
&((FSCatalogInfoObject *)self)->ob_itself.valence,
&((FSCatalogInfoObject *)self)->ob_itself.dataLogicalSize,
&((FSCatalogInfoObject *)self)->ob_itself.dataPhysicalSize,
&((FSCatalogInfoObject *)self)->ob_itself.rsrcLogicalSize,
&((FSCatalogInfoObject *)self)->ob_itself.rsrcPhysicalSize,
&((FSCatalogInfoObject *)self)->ob_itself.sharingFlags,
&((FSCatalogInfoObject *)self)->ob_itself.userPrivileges))
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "|HhllO&O&O&O&O&llllllb", kw, &((FSCatalogInfoObject *)_self)->ob_itself.nodeFlags,
&((FSCatalogInfoObject *)_self)->ob_itself.volume,
&((FSCatalogInfoObject *)_self)->ob_itself.parentDirID,
&((FSCatalogInfoObject *)_self)->ob_itself.nodeID,
UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.createDate,
UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.contentModDate,
UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.attributeModDate,
UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.accessDate,
UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.backupDate,
&((FSCatalogInfoObject *)_self)->ob_itself.valence,
&((FSCatalogInfoObject *)_self)->ob_itself.dataLogicalSize,
&((FSCatalogInfoObject *)_self)->ob_itself.dataPhysicalSize,
&((FSCatalogInfoObject *)_self)->ob_itself.rsrcLogicalSize,
&((FSCatalogInfoObject *)_self)->ob_itself.rsrcPhysicalSize,
&((FSCatalogInfoObject *)_self)->ob_itself.sharingFlags,
&((FSCatalogInfoObject *)_self)->ob_itself.userPrivileges))
{
return -1;
}
@ -394,7 +395,7 @@ static int FSCatalogInfo_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
#define FSCatalogInfo_tp_alloc PyType_GenericAlloc
static PyObject *FSCatalogInfo_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *FSCatalogInfo_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
@ -473,6 +474,7 @@ static PyObject *FInfo_New(FInfo *itself)
it->ob_itself = *itself;
return (PyObject *)it;
}
static int FInfo_Convert(PyObject *v, FInfo *p_itself)
{
if (!FInfo_Check(v))
@ -564,14 +566,14 @@ static PyGetSetDef FInfo_getsetlist[] = {
#define FInfo_repr NULL
#define FInfo_hash NULL
static int FInfo_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
static int FInfo_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
FInfo *itself = NULL;
static char *kw[] = {"itself", 0};
if (PyArg_ParseTupleAndKeywords(args, kwds, "|O&", kw, FInfo_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "|O&", kw, FInfo_Convert, &itself))
{
if (itself) memcpy(&((FInfoObject *)self)->ob_itself, itself, sizeof(FInfo));
if (itself) memcpy(&((FInfoObject *)_self)->ob_itself, itself, sizeof(FInfo));
return 0;
}
return -1;
@ -579,7 +581,7 @@ static int FInfo_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
#define FInfo_tp_alloc PyType_GenericAlloc
static PyObject *FInfo_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *FInfo_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
@ -660,6 +662,7 @@ static PyObject *Alias_New(AliasHandle itself)
it->ob_freeit = NULL;
return (PyObject *)it;
}
static int Alias_Convert(PyObject *v, AliasHandle *p_itself)
{
if (!Alias_Check(v))
@ -886,7 +889,7 @@ static PyGetSetDef Alias_getsetlist[] = {
#define Alias_repr NULL
#define Alias_hash NULL
static int Alias_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
static int Alias_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
AliasHandle itself = NULL;
char *rawdata = NULL;
@ -894,7 +897,7 @@ static int Alias_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
Handle h;
static char *kw[] = {"itself", "rawdata", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O&s#", kw, Alias_Convert, &itself, &rawdata, &rawdatalen))
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "|O&s#", kw, Alias_Convert, &itself, &rawdata, &rawdatalen))
return -1;
if (itself && rawdata)
{
@ -916,16 +919,16 @@ static int Alias_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
HLock(h);
memcpy((char *)*h, rawdata, rawdatalen);
HUnlock(h);
((AliasObject *)self)->ob_itself = (AliasHandle)h;
((AliasObject *)_self)->ob_itself = (AliasHandle)h;
return 0;
}
((AliasObject *)self)->ob_itself = itself;
((AliasObject *)_self)->ob_itself = itself;
return 0;
}
#define Alias_tp_alloc PyType_GenericAlloc
static PyObject *Alias_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *Alias_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
@ -1253,49 +1256,6 @@ static PyObject *FSSpec_IsAliasFile(FSSpecObject *_self, PyObject *_args)
return _res;
}
static OSErr
_PyMac_GetFullPathname(FSSpec *fss, char *path, int len)
{
FSRef fsr;
OSErr err;
*path = '\0';
err = FSpMakeFSRef(fss, &fsr);
if (err == fnfErr) {
/* FSSpecs can point to non-existing files, fsrefs can't. */
FSSpec fss2;
int tocopy;
err = FSMakeFSSpec(fss->vRefNum, fss->parID, "", &fss2);
if (err)
return err;
err = FSpMakeFSRef(&fss2, &fsr);
if (err)
return err;
err = (OSErr)FSRefMakePath(&fsr, path, len-1);
if (err)
return err;
/* This part is not 100% safe: we append the filename part, but
** I'm not sure that we don't run afoul of the various 8bit
** encodings here. Will have to look this up at some point...
*/
strcat(path, "/");
tocopy = fss->name[0];
if ((strlen(path) + tocopy) >= len)
tocopy = len - strlen(path) - 1;
if (tocopy > 0)
strncat(path, fss->name+1, tocopy);
}
else {
if (err)
return err;
err = (OSErr)FSRefMakePath(&fsr, path, len);
if (err)
return err;
}
return 0;
}
static PyObject *FSSpec_as_pathname(FSSpecObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@ -1305,7 +1265,7 @@ static PyObject *FSSpec_as_pathname(FSSpecObject *_self, PyObject *_args)
if (!PyArg_ParseTuple(_args, ""))
return NULL;
err = _PyMac_GetFullPathname(&_self->ob_itself, strbuf, sizeof(strbuf));
err = PyMac_GetFullPathname(&_self->ob_itself, strbuf, sizeof(strbuf));
if ( err ) {
PyMac_Error(err);
return NULL;
@ -1392,14 +1352,14 @@ static PyObject * FSSpec_repr(FSSpecObject *self)
}
#define FSSpec_hash NULL
static int FSSpec_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
static int FSSpec_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
PyObject *v = NULL;
char *rawdata = NULL;
int rawdatalen = 0;
static char *kw[] = {"itself", "rawdata", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Os#", kw, &v, &rawdata, &rawdatalen))
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "|Os#", kw, &v, &rawdata, &rawdatalen))
return -1;
if (v && rawdata)
{
@ -1418,16 +1378,16 @@ static int FSSpec_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
PyErr_SetString(PyExc_TypeError, "FSSpec rawdata incorrect size");
return -1;
}
memcpy(&((FSSpecObject *)self)->ob_itself, rawdata, rawdatalen);
memcpy(&((FSSpecObject *)_self)->ob_itself, rawdata, rawdatalen);
return 0;
}
if (PyMac_GetFSSpec(v, &((FSSpecObject *)self)->ob_itself)) return 0;
if (PyMac_GetFSSpec(v, &((FSSpecObject *)_self)->ob_itself)) return 0;
return -1;
}
#define FSSpec_tp_alloc PyType_GenericAlloc
static PyObject *FSSpec_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *FSSpec_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
@ -1936,14 +1896,14 @@ static PyGetSetDef FSRef_getsetlist[] = {
#define FSRef_repr NULL
#define FSRef_hash NULL
static int FSRef_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
static int FSRef_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
PyObject *v = NULL;
char *rawdata = NULL;
int rawdatalen = 0;
static char *kw[] = {"itself", "rawdata", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Os#", kw, &v, &rawdata, &rawdatalen))
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "|Os#", kw, &v, &rawdata, &rawdatalen))
return -1;
if (v && rawdata)
{
@ -1962,16 +1922,16 @@ static int FSRef_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
PyErr_SetString(PyExc_TypeError, "FSRef rawdata incorrect size");
return -1;
}
memcpy(&((FSRefObject *)self)->ob_itself, rawdata, rawdatalen);
memcpy(&((FSRefObject *)_self)->ob_itself, rawdata, rawdatalen);
return 0;
}
if (PyMac_GetFSRef(v, &((FSRefObject *)self)->ob_itself)) return 0;
if (PyMac_GetFSRef(v, &((FSRefObject *)_self)->ob_itself)) return 0;
return -1;
}
#define FSRef_tp_alloc PyType_GenericAlloc
static PyObject *FSRef_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *FSRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
@ -3199,7 +3159,7 @@ PyMac_GetFSRef(PyObject *v, FSRef *fsr)
if ( PyString_Check(v) || PyUnicode_Check(v)) {
char *path = NULL;
if (!PyArg_Parse(v, "et", Py_FileSystemDefaultEncoding, &path))
return NULL;
return 0;
if ( (err=FSPathMakeRef(path, fsr, NULL)) ) {
PyMac_Error(err);
return 0;

View File

@ -254,7 +254,7 @@ PyMac_GetFSRef(PyObject *v, FSRef *fsr)
if ( PyString_Check(v) || PyUnicode_Check(v)) {
char *path = NULL;
if (!PyArg_Parse(v, "et", Py_FileSystemDefaultEncoding, &path))
return NULL;
return 0;
if ( (err=FSPathMakeRef(path, fsr, NULL)) ) {
PyMac_Error(err);
return 0;
@ -389,22 +389,22 @@ class FSCatalogInfoDefinition(PEP253Mixin, ObjectDefinition):
]
# The same info, but in a different form
INITFORMAT = "HhllO&O&O&O&O&llllllb"
INITARGS = """&((FSCatalogInfoObject *)self)->ob_itself.nodeFlags,
&((FSCatalogInfoObject *)self)->ob_itself.volume,
&((FSCatalogInfoObject *)self)->ob_itself.parentDirID,
&((FSCatalogInfoObject *)self)->ob_itself.nodeID,
UTCDateTime_Convert, &((FSCatalogInfoObject *)self)->ob_itself.createDate,
UTCDateTime_Convert, &((FSCatalogInfoObject *)self)->ob_itself.contentModDate,
UTCDateTime_Convert, &((FSCatalogInfoObject *)self)->ob_itself.attributeModDate,
UTCDateTime_Convert, &((FSCatalogInfoObject *)self)->ob_itself.accessDate,
UTCDateTime_Convert, &((FSCatalogInfoObject *)self)->ob_itself.backupDate,
&((FSCatalogInfoObject *)self)->ob_itself.valence,
&((FSCatalogInfoObject *)self)->ob_itself.dataLogicalSize,
&((FSCatalogInfoObject *)self)->ob_itself.dataPhysicalSize,
&((FSCatalogInfoObject *)self)->ob_itself.rsrcLogicalSize,
&((FSCatalogInfoObject *)self)->ob_itself.rsrcPhysicalSize,
&((FSCatalogInfoObject *)self)->ob_itself.sharingFlags,
&((FSCatalogInfoObject *)self)->ob_itself.userPrivileges"""
INITARGS = """&((FSCatalogInfoObject *)_self)->ob_itself.nodeFlags,
&((FSCatalogInfoObject *)_self)->ob_itself.volume,
&((FSCatalogInfoObject *)_self)->ob_itself.parentDirID,
&((FSCatalogInfoObject *)_self)->ob_itself.nodeID,
UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.createDate,
UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.contentModDate,
UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.attributeModDate,
UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.accessDate,
UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.backupDate,
&((FSCatalogInfoObject *)_self)->ob_itself.valence,
&((FSCatalogInfoObject *)_self)->ob_itself.dataLogicalSize,
&((FSCatalogInfoObject *)_self)->ob_itself.dataPhysicalSize,
&((FSCatalogInfoObject *)_self)->ob_itself.rsrcLogicalSize,
&((FSCatalogInfoObject *)_self)->ob_itself.rsrcPhysicalSize,
&((FSCatalogInfoObject *)_self)->ob_itself.sharingFlags,
&((FSCatalogInfoObject *)_self)->ob_itself.userPrivileges"""
INITNAMES = """
"nodeFlags",
"volume",
@ -442,7 +442,7 @@ class FSCatalogInfoDefinition(PEP253Mixin, ObjectDefinition):
def output_tp_initBody(self):
Output("static char *kw[] = {%s, 0};", self.INITNAMES)
Output()
Output("if (!PyArg_ParseTupleAndKeywords(args, kwds, \"|%s\", kw, %s))",
Output("if (!PyArg_ParseTupleAndKeywords(_args, _kwds, \"|%s\", kw, %s))",
self.INITFORMAT, self.INITARGS)
OutLbrace()
Output("return -1;")
@ -498,9 +498,9 @@ class FInfoDefinition(PEP253Mixin, ObjectDefinition):
Output("%s *itself = NULL;", self.itselftype)
Output("static char *kw[] = {\"itself\", 0};")
Output()
Output("if (PyArg_ParseTupleAndKeywords(args, kwds, \"|O&\", kw, FInfo_Convert, &itself))")
Output("if (PyArg_ParseTupleAndKeywords(_args, _kwds, \"|O&\", kw, FInfo_Convert, &itself))")
OutLbrace()
Output("if (itself) memcpy(&((%s *)self)->ob_itself, itself, sizeof(%s));",
Output("if (itself) memcpy(&((%s *)_self)->ob_itself, itself, sizeof(%s));",
self.objecttype, self.itselftype)
Output("return 0;")
OutRbrace()
@ -540,7 +540,7 @@ class FSSpecDefinition(PEP253Mixin, ObjectDefinition):
Output("int rawdatalen = 0;")
Output("static char *kw[] = {\"itself\", \"rawdata\", 0};")
Output()
Output("if (!PyArg_ParseTupleAndKeywords(args, kwds, \"|Os#\", kw, &v, &rawdata, &rawdatalen))")
Output("if (!PyArg_ParseTupleAndKeywords(_args, _kwds, \"|Os#\", kw, &v, &rawdata, &rawdatalen))")
Output("return -1;")
Output("if (v && rawdata)")
OutLbrace()
@ -560,10 +560,10 @@ class FSSpecDefinition(PEP253Mixin, ObjectDefinition):
self.itselftype)
Output("return -1;")
OutRbrace()
Output("memcpy(&((%s *)self)->ob_itself, rawdata, rawdatalen);", self.objecttype)
Output("memcpy(&((%s *)_self)->ob_itself, rawdata, rawdatalen);", self.objecttype)
Output("return 0;")
OutRbrace()
Output("if (PyMac_GetFSSpec(v, &((%s *)self)->ob_itself)) return 0;", self.objecttype)
Output("if (PyMac_GetFSSpec(v, &((%s *)_self)->ob_itself)) return 0;", self.objecttype)
Output("return -1;")
def outputRepr(self):
@ -613,7 +613,7 @@ class FSRefDefinition(PEP253Mixin, ObjectDefinition):
Output("int rawdatalen = 0;")
Output("static char *kw[] = {\"itself\", \"rawdata\", 0};")
Output()
Output("if (!PyArg_ParseTupleAndKeywords(args, kwds, \"|Os#\", kw, &v, &rawdata, &rawdatalen))")
Output("if (!PyArg_ParseTupleAndKeywords(_args, _kwds, \"|Os#\", kw, &v, &rawdata, &rawdatalen))")
Output("return -1;")
Output("if (v && rawdata)")
OutLbrace()
@ -633,10 +633,10 @@ class FSRefDefinition(PEP253Mixin, ObjectDefinition):
self.itselftype)
Output("return -1;")
OutRbrace()
Output("memcpy(&((%s *)self)->ob_itself, rawdata, rawdatalen);", self.objecttype)
Output("memcpy(&((%s *)_self)->ob_itself, rawdata, rawdatalen);", self.objecttype)
Output("return 0;")
OutRbrace()
Output("if (PyMac_GetFSRef(v, &((%s *)self)->ob_itself)) return 0;", self.objecttype)
Output("if (PyMac_GetFSRef(v, &((%s *)_self)->ob_itself)) return 0;", self.objecttype)
Output("return -1;")
class AliasDefinition(PEP253Mixin, ObjectDefinition):
@ -689,7 +689,7 @@ class AliasDefinition(PEP253Mixin, ObjectDefinition):
Output("Handle h;")
Output("static char *kw[] = {\"itself\", \"rawdata\", 0};")
Output()
Output("if (!PyArg_ParseTupleAndKeywords(args, kwds, \"|O&s#\", kw, %s_Convert, &itself, &rawdata, &rawdatalen))",
Output("if (!PyArg_ParseTupleAndKeywords(_args, _kwds, \"|O&s#\", kw, %s_Convert, &itself, &rawdata, &rawdatalen))",
self.prefix)
Output("return -1;")
Output("if (itself && rawdata)")
@ -712,10 +712,10 @@ class AliasDefinition(PEP253Mixin, ObjectDefinition):
Output("HLock(h);")
Output("memcpy((char *)*h, rawdata, rawdatalen);")
Output("HUnlock(h);")
Output("((%s *)self)->ob_itself = (%s)h;", self.objecttype, self.itselftype)
Output("((%s *)_self)->ob_itself = (%s)h;", self.objecttype, self.itselftype)
Output("return 0;")
OutRbrace()
Output("((%s *)self)->ob_itself = itself;", self.objecttype)
Output("((%s *)_self)->ob_itself = itself;", self.objecttype)
Output("return 0;")
# Alias methods come in two flavors: those with the alias as arg1 and

View File

@ -34,6 +34,7 @@ PyObject *IBNibRefObj_New(IBNibRef itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int IBNibRefObj_Convert(PyObject *v, IBNibRef *p_itself)
{
if (!IBNibRefObj_Check(v))
@ -145,16 +146,16 @@ static PyMethodDef IBNibRefObj_methods[] = {
#define IBNibRefObj_tp_alloc PyType_GenericAlloc
static PyObject *IBNibRefObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *IBNibRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
IBNibRef itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, IBNibRefObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((IBNibRefObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, IBNibRefObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((IBNibRefObject *)_self)->ob_itself = itself;
return _self;
}
#define IBNibRefObj_tp_free PyObject_Del

View File

@ -61,6 +61,7 @@ PyObject *ListObj_New(ListHandle itself)
SetListRefCon(itself, (long)it);
return (PyObject *)it;
}
int ListObj_Convert(PyObject *v, ListHandle *p_itself)
{
if (!ListObj_Check(v))
@ -738,16 +739,16 @@ static PyGetSetDef ListObj_getsetlist[] = {
#define ListObj_tp_alloc PyType_GenericAlloc
static PyObject *ListObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *ListObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
ListHandle itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, ListObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((ListObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, ListObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((ListObject *)_self)->ob_itself = itself;
return _self;
}
#define ListObj_tp_free PyObject_Del

View File

@ -72,6 +72,7 @@ PyObject *MenuObj_New(MenuHandle itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int MenuObj_Convert(PyObject *v, MenuHandle *p_itself)
{
if (!MenuObj_Check(v))
@ -2536,16 +2537,16 @@ static PyMethodDef MenuObj_methods[] = {
#define MenuObj_tp_alloc PyType_GenericAlloc
static PyObject *MenuObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *MenuObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
MenuHandle itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, MenuObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((MenuObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, MenuObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((MenuObject *)_self)->ob_itself = itself;
return _self;
}
#define MenuObj_tp_free PyObject_Del

View File

@ -102,6 +102,7 @@ PyObject *TXNObj_New(TXNObject itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int TXNObj_Convert(PyObject *v, TXNObject *p_itself)
{
if (!TXNObj_Check(v))
@ -1255,16 +1256,16 @@ static PyMethodDef TXNObj_methods[] = {
#define TXNObj_tp_alloc PyType_GenericAlloc
static PyObject *TXNObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *TXNObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
TXNObject itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, TXNObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((TXNObjectObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, TXNObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((TXNObjectObject *)_self)->ob_itself = itself;
return _self;
}
#define TXNObj_tp_free PyObject_Del
@ -1337,6 +1338,7 @@ PyObject *TXNFontMenuObj_New(TXNFontMenuObject itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int TXNFontMenuObj_Convert(PyObject *v, TXNFontMenuObject *p_itself)
{
if (!TXNFontMenuObj_Check(v))
@ -1408,16 +1410,16 @@ static PyMethodDef TXNFontMenuObj_methods[] = {
#define TXNFontMenuObj_tp_alloc PyType_GenericAlloc
static PyObject *TXNFontMenuObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *TXNFontMenuObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
TXNFontMenuObject itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, TXNFontMenuObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((TXNFontMenuObjectObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, TXNFontMenuObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((TXNFontMenuObjectObject *)_self)->ob_itself = itself;
return _self;
}
#define TXNFontMenuObj_tp_free PyObject_Del

View File

@ -53,6 +53,7 @@ PyObject *OSAObj_New(ComponentInstance itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int OSAObj_Convert(PyObject *v, ComponentInstance *p_itself)
{
@ -1133,16 +1134,16 @@ static PyMethodDef OSAObj_methods[] = {
#define OSAObj_tp_alloc PyType_GenericAlloc
static PyObject *OSAObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *OSAObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
ComponentInstance itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, OSAObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((OSAComponentInstanceObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, OSAObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((OSAComponentInstanceObject *)_self)->ob_itself = itself;
return _self;
}
#define OSAObj_tp_free PyObject_Del

View File

@ -89,6 +89,7 @@ PyObject *GrafObj_New(GrafPtr itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int GrafObj_Convert(PyObject *v, GrafPtr *p_itself)
{
#if 1
@ -1341,16 +1342,16 @@ static PyGetSetDef GrafObj_getsetlist[] = {
#define GrafObj_tp_alloc PyType_GenericAlloc
static PyObject *GrafObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *GrafObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
GrafPtr itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, GrafObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((GrafPortObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, GrafObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((GrafPortObject *)_self)->ob_itself = itself;
return _self;
}
#define GrafObj_tp_free PyObject_Del
@ -1427,6 +1428,7 @@ PyObject *BMObj_New(BitMapPtr itself)
it->referred_bitmap = NULL;
return (PyObject *)it;
}
int BMObj_Convert(PyObject *v, BitMapPtr *p_itself)
{
if (!BMObj_Check(v))
@ -1539,16 +1541,16 @@ static PyGetSetDef BMObj_getsetlist[] = {
#define BMObj_tp_alloc PyType_GenericAlloc
static PyObject *BMObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *BMObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
BitMapPtr itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, BMObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((BitMapObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, BMObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((BitMapObject *)_self)->ob_itself = itself;
return _self;
}
#define BMObj_tp_free PyObject_Del
@ -5822,6 +5824,7 @@ static PyObject *Qd_MacDrawText(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
char *textBuf__in__;
int textBuf__len__;
int textBuf__in_len__;
short firstByte;
short byteCount;
@ -5882,6 +5885,7 @@ static PyObject *Qd_TextWidth(PyObject *_self, PyObject *_args)
PyObject *_res = NULL;
short _rv;
char *textBuf__in__;
int textBuf__len__;
int textBuf__in_len__;
short firstByte;
short byteCount;
@ -6467,6 +6471,7 @@ static PyObject *Qd_DrawText(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
char *textBuf__in__;
int textBuf__len__;
int textBuf__in_len__;
short firstByte;
short byteCount;

View File

@ -50,6 +50,7 @@ PyObject *GWorldObj_New(GWorldPtr itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int GWorldObj_Convert(PyObject *v, GWorldPtr *p_itself)
{
if (!GWorldObj_Check(v))
@ -134,16 +135,16 @@ static PyMethodDef GWorldObj_methods[] = {
#define GWorldObj_tp_alloc PyType_GenericAlloc
static PyObject *GWorldObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *GWorldObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
GWorldPtr itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, GWorldObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((GWorldObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, GWorldObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((GWorldObject *)_self)->ob_itself = itself;
return _self;
}
#define GWorldObj_tp_free PyObject_Del

View File

@ -116,6 +116,7 @@ PyObject *IdleManagerObj_New(IdleManager itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int IdleManagerObj_Convert(PyObject *v, IdleManager *p_itself)
{
if (v == Py_None)
@ -154,16 +155,16 @@ static PyMethodDef IdleManagerObj_methods[] = {
#define IdleManagerObj_tp_alloc PyType_GenericAlloc
static PyObject *IdleManagerObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *IdleManagerObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
IdleManager itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, IdleManagerObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((IdleManagerObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, IdleManagerObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((IdleManagerObject *)_self)->ob_itself = itself;
return _self;
}
#define IdleManagerObj_tp_free PyObject_Del
@ -239,6 +240,7 @@ PyObject *MovieCtlObj_New(MovieController itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int MovieCtlObj_Convert(PyObject *v, MovieController *p_itself)
{
if (v == Py_None)
@ -1273,16 +1275,16 @@ static PyMethodDef MovieCtlObj_methods[] = {
#define MovieCtlObj_tp_alloc PyType_GenericAlloc
static PyObject *MovieCtlObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *MovieCtlObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
MovieController itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, MovieCtlObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((MovieControllerObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, MovieCtlObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((MovieControllerObject *)_self)->ob_itself = itself;
return _self;
}
#define MovieCtlObj_tp_free PyObject_Del
@ -1358,6 +1360,7 @@ PyObject *TimeBaseObj_New(TimeBase itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int TimeBaseObj_Convert(PyObject *v, TimeBase *p_itself)
{
if (v == Py_None)
@ -1766,16 +1769,16 @@ static PyMethodDef TimeBaseObj_methods[] = {
#define TimeBaseObj_tp_alloc PyType_GenericAlloc
static PyObject *TimeBaseObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *TimeBaseObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
TimeBase itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, TimeBaseObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((TimeBaseObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, TimeBaseObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((TimeBaseObject *)_self)->ob_itself = itself;
return _self;
}
#define TimeBaseObj_tp_free PyObject_Del
@ -1851,6 +1854,7 @@ PyObject *UserDataObj_New(UserData itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int UserDataObj_Convert(PyObject *v, UserData *p_itself)
{
if (v == Py_None)
@ -2136,16 +2140,16 @@ static PyMethodDef UserDataObj_methods[] = {
#define UserDataObj_tp_alloc PyType_GenericAlloc
static PyObject *UserDataObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *UserDataObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
UserData itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, UserDataObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((UserDataObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, UserDataObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((UserDataObject *)_self)->ob_itself = itself;
return _self;
}
#define UserDataObj_tp_free PyObject_Del
@ -2221,6 +2225,7 @@ PyObject *MediaObj_New(Media itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int MediaObj_Convert(PyObject *v, Media *p_itself)
{
if (v == Py_None)
@ -3377,16 +3382,16 @@ static PyMethodDef MediaObj_methods[] = {
#define MediaObj_tp_alloc PyType_GenericAlloc
static PyObject *MediaObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *MediaObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
Media itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, MediaObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((MediaObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, MediaObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((MediaObject *)_self)->ob_itself = itself;
return _self;
}
#define MediaObj_tp_free PyObject_Del
@ -3462,6 +3467,7 @@ PyObject *TrackObj_New(Track itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int TrackObj_Convert(PyObject *v, Track *p_itself)
{
if (v == Py_None)
@ -4724,16 +4730,16 @@ static PyMethodDef TrackObj_methods[] = {
#define TrackObj_tp_alloc PyType_GenericAlloc
static PyObject *TrackObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *TrackObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
Track itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, TrackObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((TrackObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, TrackObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((TrackObject *)_self)->ob_itself = itself;
return _self;
}
#define TrackObj_tp_free PyObject_Del
@ -4809,6 +4815,7 @@ PyObject *MovieObj_New(Movie itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int MovieObj_Convert(PyObject *v, Movie *p_itself)
{
if (v == Py_None)
@ -7276,16 +7283,16 @@ static PyMethodDef MovieObj_methods[] = {
#define MovieObj_tp_alloc PyType_GenericAlloc
static PyObject *MovieObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *MovieObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
Movie itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, MovieObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((MovieObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, MovieObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((MovieObject *)_self)->ob_itself = itself;
return _self;
}
#define MovieObj_tp_free PyObject_Del
@ -7361,6 +7368,7 @@ PyObject *SGOutputObj_New(SGOutput itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int SGOutputObj_Convert(PyObject *v, SGOutput *p_itself)
{
if (v == Py_None)
@ -7399,16 +7407,16 @@ static PyMethodDef SGOutputObj_methods[] = {
#define SGOutputObj_tp_alloc PyType_GenericAlloc
static PyObject *SGOutputObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *SGOutputObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
SGOutput itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, SGOutputObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((SGOutputObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, SGOutputObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((SGOutputObject *)_self)->ob_itself = itself;
return _self;
}
#define SGOutputObj_tp_free PyObject_Del

View File

@ -59,6 +59,7 @@ PyObject *ResObj_New(Handle itself)
it->ob_freeit = NULL;
return (PyObject *)it;
}
int ResObj_Convert(PyObject *v, Handle *p_itself)
{
if (!ResObj_Check(v))
@ -572,26 +573,26 @@ static PyGetSetDef ResObj_getsetlist[] = {
#define ResObj_repr NULL
#define ResObj_hash NULL
static int ResObj_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
static int ResObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
char *srcdata = NULL;
int srclen = 0;
Handle itself;
char *kw[] = {"itself", 0};
if (PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, ResObj_Convert, &itself))
if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, ResObj_Convert, &itself))
{
((ResourceObject *)self)->ob_itself = itself;
((ResourceObject *)_self)->ob_itself = itself;
return 0;
}
PyErr_Clear();
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|s#", kw, &srcdata, &srclen)) return -1;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "|s#", kw, &srcdata, &srclen)) return -1;
if ((itself = NewHandle(srclen)) == NULL)
{
PyErr_NoMemory();
return 0;
}
((ResourceObject *)self)->ob_itself = itself;
((ResourceObject *)_self)->ob_itself = itself;
if (srclen && srcdata)
{
HLock(itself);
@ -603,7 +604,7 @@ static int ResObj_tp_init(PyObject *self, PyObject *args, PyObject *kwds)
#define ResObj_tp_alloc PyType_GenericAlloc
static PyObject *ResObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *ResObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;

View File

@ -182,20 +182,20 @@ class ResDefinition(PEP253Mixin, GlobalObjectDefinition):
Output("%s itself;", self.itselftype);
Output("char *kw[] = {\"itself\", 0};")
Output()
Output("if (PyArg_ParseTupleAndKeywords(args, kwds, \"O&\", kw, %s_Convert, &itself))",
Output("if (PyArg_ParseTupleAndKeywords(_args, _kwds, \"O&\", kw, %s_Convert, &itself))",
self.prefix);
OutLbrace()
Output("((%s *)self)->ob_itself = itself;", self.objecttype)
Output("((%s *)_self)->ob_itself = itself;", self.objecttype)
Output("return 0;")
OutRbrace()
Output("PyErr_Clear();")
Output("if (!PyArg_ParseTupleAndKeywords(args, kwds, \"|s#\", kw, &srcdata, &srclen)) return -1;")
Output("if (!PyArg_ParseTupleAndKeywords(_args, _kwds, \"|s#\", kw, &srcdata, &srclen)) return -1;")
Output("if ((itself = NewHandle(srclen)) == NULL)")
OutLbrace()
Output("PyErr_NoMemory();")
Output("return 0;")
OutRbrace()
Output("((%s *)self)->ob_itself = itself;", self.objecttype)
Output("((%s *)_self)->ob_itself = itself;", self.objecttype)
# XXXX Output("((%s *)self)->ob_freeit = PyMac_AutoDisposeHandle;")
Output("if (srclen && srcdata)")
OutLbrace()

View File

@ -77,6 +77,7 @@ PyObject *TEObj_New(TEHandle itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int TEObj_Convert(PyObject *v, TEHandle *p_itself)
{
if (!TEObj_Check(v))
@ -983,16 +984,16 @@ static PyGetSetDef TEObj_getsetlist[] = {
#define TEObj_tp_alloc PyType_GenericAlloc
static PyObject *TEObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *TEObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
TEHandle itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, TEObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((TEObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, TEObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((TEObject *)_self)->ob_itself = itself;
return _self;
}
#define TEObj_tp_free PyObject_Del

View File

@ -232,6 +232,7 @@ PyObject *WEOObj_New(WEObjectReference itself)
it->ob_itself = itself;
return (PyObject *)it;
}
int WEOObj_Convert(PyObject *v, WEObjectReference *p_itself)
{
if (!WEOObj_Check(v))
@ -400,16 +401,16 @@ static PyMethodDef WEOObj_methods[] = {
#define WEOObj_tp_alloc PyType_GenericAlloc
static PyObject *WEOObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *WEOObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
WEObjectReference itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, WEOObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((WEOObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, WEOObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((WEOObject *)_self)->ob_itself = itself;
return _self;
}
#define WEOObj_tp_free PyObject_Del
@ -486,6 +487,7 @@ PyObject *wasteObj_New(WEReference itself)
WESetInfo(weRefCon, (void *)&it, itself);
return (PyObject *)it;
}
int wasteObj_Convert(PyObject *v, WEReference *p_itself)
{
if (!wasteObj_Check(v))
@ -2149,16 +2151,16 @@ static PyMethodDef wasteObj_methods[] = {
#define wasteObj_tp_alloc PyType_GenericAlloc
static PyObject *wasteObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *wasteObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
WEReference itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, wasteObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((wasteObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, wasteObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((wasteObject *)_self)->ob_itself = itself;
return _self;
}
#define wasteObj_tp_free PyObject_Del

View File

@ -69,6 +69,7 @@ PyObject *WinObj_New(WindowPtr itself)
}
return (PyObject *)it;
}
int WinObj_Convert(PyObject *v, WindowPtr *p_itself)
{
@ -2590,16 +2591,16 @@ static int WinObj_hash(WindowObject *self)
#define WinObj_tp_alloc PyType_GenericAlloc
static PyObject *WinObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *WinObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
PyObject *self;
PyObject *_self;
WindowPtr itself;
char *kw[] = {"itself", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, WinObj_Convert, &itself)) return NULL;
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
((WindowObject *)self)->ob_itself = itself;
return self;
if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, WinObj_Convert, &itself)) return NULL;
if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
((WindowObject *)_self)->ob_itself = itself;
return _self;
}
#define WinObj_tp_free PyObject_Del