summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/ctl
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1997-09-20 17:40:22 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1997-09-20 17:40:22 (GMT)
commita755e68df647bd3dc27749998d19cc47649a8b4f (patch)
tree95f40587e6e5befe6a870474fc9a15cc0f3683b1 /Mac/Modules/ctl
parent6dd48686810f4806d98eaffa29e53dfabaca2e08 (diff)
downloadcpython-a755e68df647bd3dc27749998d19cc47649a8b4f.zip
cpython-a755e68df647bd3dc27749998d19cc47649a8b4f.tar.gz
cpython-a755e68df647bd3dc27749998d19cc47649a8b4f.tar.bz2
Export type objects to Python
Diffstat (limited to 'Mac/Modules/ctl')
-rw-r--r--Mac/Modules/ctl/Ctlmodule.c4
-rw-r--r--Mac/Modules/ctl/ctledit.py2
2 files changed, 5 insertions, 1 deletions
diff --git a/Mac/Modules/ctl/Ctlmodule.c b/Mac/Modules/ctl/Ctlmodule.c
index 654f671..573f581 100644
--- a/Mac/Modules/ctl/Ctlmodule.c
+++ b/Mac/Modules/ctl/Ctlmodule.c
@@ -733,6 +733,10 @@ void initCtl()
if (Ctl_Error == NULL ||
PyDict_SetItemString(d, "Error", Ctl_Error) != 0)
Py_FatalError("can't initialize Ctl.Error");
+ Control_Type.ob_type = &PyType_Type;
+ Py_INCREF(&Control_Type);
+ if (PyDict_SetItemString(d, "ControlType", (PyObject *)&Control_Type) != 0)
+ Py_FatalError("can't initialize ControlType");
}
/* ========================= End module Ctl ========================= */
diff --git a/Mac/Modules/ctl/ctledit.py b/Mac/Modules/ctl/ctledit.py
index 9240851..a23eef8 100644
--- a/Mac/Modules/ctl/ctledit.py
+++ b/Mac/Modules/ctl/ctledit.py
@@ -11,7 +11,7 @@ DisposeControl_body = """
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;
}