it = PyObject_NEW(ControlObject, &Control_Type);
if (it == NULL) return NULL;
it->ob_itself = itself;
- SetCRefCon(itself, (long)it);
+ SetControlReference(itself, (long)it);
return (PyObject *)it;
}
CtlObj_Convert(v, p_itself)
static void CtlObj_dealloc(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);
}
if (!PyArg_ParseTuple(_args, ""))
return NULL;
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);
_self->ob_itself = NULL;
}
if (c == NULL)
it = NULL;
else
- it = (PyObject *) GetCRefCon(c);
+ it = (PyObject *) GetControlReference(c);
if (it == NULL || ((ControlObject *)it)->ob_itself != c)
it = Py_None;
Py_INCREF(it);
if (c == NULL)
it = NULL;
else
- it = (PyObject *) GetCRefCon(c);
+ it = (PyObject *) GetControlReference(c);
if (it == NULL || ((ControlObject *)it)->ob_itself != c)
it = Py_None;
Py_INCREF(it);
Output("if (itself == NULL) return PyMac_Error(resNotFound);")
def outputInitStructMembers(self):
GlobalObjectDefinition.outputInitStructMembers(self)
- Output("SetCRefCon(itself, (long)it);")
+ Output("SetControlReference(itself, (long)it);")
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
module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)