Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 85ae4a8

Browse files
committed
Changed [SG]etCRefCon to [SG]etControlReference
1 parent 5495672 commit 85ae4a8

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

Mac/Modules/ctl/Ctlmodule.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ PyObject *CtlObj_New(itself)
7373
it = PyObject_NEW(ControlObject, &Control_Type);
7474
if (it == NULL) return NULL;
7575
it->ob_itself = itself;
76-
SetCRefCon(itself, (long)it);
76+
SetControlReference(itself, (long)it);
7777
return (PyObject *)it;
7878
}
7979
CtlObj_Convert(v, p_itself)
@@ -92,7 +92,7 @@ CtlObj_Convert(v, p_itself)
9292
static void CtlObj_dealloc(self)
9393
ControlObject *self;
9494
{
95-
if (self->ob_itself) SetCRefCon(self->ob_itself, (long)0); /* Make it forget about us */
95+
if (self->ob_itself) SetControlReference(self->ob_itself, (long)0); /* Make it forget about us */
9696
PyMem_DEL(self);
9797
}
9898

@@ -448,7 +448,7 @@ static PyObject *CtlObj_DisposeControl(_self, _args)
448448
if (!PyArg_ParseTuple(_args, ""))
449449
return NULL;
450450
if ( _self->ob_itself ) {
451-
SetCRefCon(_self->ob_itself, (long)0); /* Make it forget about us */
451+
SetControlReference(_self->ob_itself, (long)0); /* Make it forget about us */
452452
DisposeControl(_self->ob_itself);
453453
_self->ob_itself = NULL;
454454
}
@@ -674,7 +674,7 @@ CtlObj_WhichControl(ControlHandle c)
674674
if (c == NULL)
675675
it = NULL;
676676
else
677-
it = (PyObject *) GetCRefCon(c);
677+
it = (PyObject *) GetControlReference(c);
678678
if (it == NULL || ((ControlObject *)it)->ob_itself != c)
679679
it = Py_None;
680680
Py_INCREF(it);

Mac/Modules/ctl/ctlsupport.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
if (c == NULL)
5555
it = NULL;
5656
else
57-
it = (PyObject *) GetCRefCon(c);
57+
it = (PyObject *) GetControlReference(c);
5858
if (it == NULL || ((ControlObject *)it)->ob_itself != c)
5959
it = Py_None;
6060
Py_INCREF(it);
@@ -67,9 +67,9 @@ def outputCheckNewArg(self):
6767
Output("if (itself == NULL) return PyMac_Error(resNotFound);")
6868
def outputInitStructMembers(self):
6969
GlobalObjectDefinition.outputInitStructMembers(self)
70-
Output("SetCRefCon(itself, (long)it);")
70+
Output("SetControlReference(itself, (long)it);")
7171
def outputCleanupStructMembers(self):
72-
Output("if (self->ob_itself) SetCRefCon(self->ob_itself, (long)0); /* Make it forget about us */")
72+
Output("if (self->ob_itself) SetControlReference(self->ob_itself, (long)0); /* Make it forget about us */")
7373

7474
# Create the generator groups and link them
7575
module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)

0 commit comments

Comments
 (0)