Changed [SG]etCRefCon to [SG]etControlReference
This commit is contained in:
parent
54956722e5
commit
85ae4a82ac
|
@ -73,7 +73,7 @@ PyObject *CtlObj_New(itself)
|
||||||
it = PyObject_NEW(ControlObject, &Control_Type);
|
it = PyObject_NEW(ControlObject, &Control_Type);
|
||||||
if (it == NULL) return NULL;
|
if (it == NULL) return NULL;
|
||||||
it->ob_itself = itself;
|
it->ob_itself = itself;
|
||||||
SetCRefCon(itself, (long)it);
|
SetControlReference(itself, (long)it);
|
||||||
return (PyObject *)it;
|
return (PyObject *)it;
|
||||||
}
|
}
|
||||||
CtlObj_Convert(v, p_itself)
|
CtlObj_Convert(v, p_itself)
|
||||||
|
@ -92,7 +92,7 @@ CtlObj_Convert(v, p_itself)
|
||||||
static void CtlObj_dealloc(self)
|
static void CtlObj_dealloc(self)
|
||||||
ControlObject *self;
|
ControlObject *self;
|
||||||
{
|
{
|
||||||
if (self->ob_itself) SetCRefCon(self->ob_itself, (long)0); /* Make it forget about us */
|
if (self->ob_itself) SetControlReference(self->ob_itself, (long)0); /* Make it forget about us */
|
||||||
PyMem_DEL(self);
|
PyMem_DEL(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -448,7 +448,7 @@ static PyObject *CtlObj_DisposeControl(_self, _args)
|
||||||
if (!PyArg_ParseTuple(_args, ""))
|
if (!PyArg_ParseTuple(_args, ""))
|
||||||
return NULL;
|
return NULL;
|
||||||
if ( _self->ob_itself ) {
|
if ( _self->ob_itself ) {
|
||||||
SetCRefCon(_self->ob_itself, (long)0); /* Make it forget about us */
|
SetControlReference(_self->ob_itself, (long)0); /* Make it forget about us */
|
||||||
DisposeControl(_self->ob_itself);
|
DisposeControl(_self->ob_itself);
|
||||||
_self->ob_itself = NULL;
|
_self->ob_itself = NULL;
|
||||||
}
|
}
|
||||||
|
@ -674,7 +674,7 @@ CtlObj_WhichControl(ControlHandle c)
|
||||||
if (c == NULL)
|
if (c == NULL)
|
||||||
it = NULL;
|
it = NULL;
|
||||||
else
|
else
|
||||||
it = (PyObject *) GetCRefCon(c);
|
it = (PyObject *) GetControlReference(c);
|
||||||
if (it == NULL || ((ControlObject *)it)->ob_itself != c)
|
if (it == NULL || ((ControlObject *)it)->ob_itself != c)
|
||||||
it = Py_None;
|
it = Py_None;
|
||||||
Py_INCREF(it);
|
Py_INCREF(it);
|
||||||
|
|
|
@ -54,7 +54,7 @@ CtlObj_WhichControl(ControlHandle c)
|
||||||
if (c == NULL)
|
if (c == NULL)
|
||||||
it = NULL;
|
it = NULL;
|
||||||
else
|
else
|
||||||
it = (PyObject *) GetCRefCon(c);
|
it = (PyObject *) GetControlReference(c);
|
||||||
if (it == NULL || ((ControlObject *)it)->ob_itself != c)
|
if (it == NULL || ((ControlObject *)it)->ob_itself != c)
|
||||||
it = Py_None;
|
it = Py_None;
|
||||||
Py_INCREF(it);
|
Py_INCREF(it);
|
||||||
|
@ -67,9 +67,9 @@ class MyObjectDefinition(GlobalObjectDefinition):
|
||||||
Output("if (itself == NULL) return PyMac_Error(resNotFound);")
|
Output("if (itself == NULL) return PyMac_Error(resNotFound);")
|
||||||
def outputInitStructMembers(self):
|
def outputInitStructMembers(self):
|
||||||
GlobalObjectDefinition.outputInitStructMembers(self)
|
GlobalObjectDefinition.outputInitStructMembers(self)
|
||||||
Output("SetCRefCon(itself, (long)it);")
|
Output("SetControlReference(itself, (long)it);")
|
||||||
def outputCleanupStructMembers(self):
|
def outputCleanupStructMembers(self):
|
||||||
Output("if (self->ob_itself) SetCRefCon(self->ob_itself, (long)0); /* Make it forget about us */")
|
Output("if (self->ob_itself) SetControlReference(self->ob_itself, (long)0); /* Make it forget about us */")
|
||||||
|
|
||||||
# Create the generator groups and link them
|
# Create the generator groups and link them
|
||||||
module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
|
module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
|
||||||
|
|
Loading…
Reference in New Issue