[Python-checkins] CVS: python/dist/src/Mac/Modules/cm _Cmmodule.c,1.5,1.6

Jack Jansen jackjansen@users.sourceforge.net
Sun, 16 Dec 2001 12:16:50 -0800


Update of /cvsroot/python/python/dist/src/Mac/Modules/cm
In directory usw-pr-cvs1:/tmp/cvs-serv2281/Python/Mac/Modules/cm

Modified Files:
	_Cmmodule.c 
Log Message:
Adapted for Universal Headers 3.4

Index: _Cmmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/cm/_Cmmodule.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** _Cmmodule.c	2001/12/08 18:02:52	1.5
--- _Cmmodule.c	2001/12/16 20:16:48	1.6
***************
*** 403,406 ****
--- 403,440 ----
  }
  
+ static PyObject *CmpObj_ResolveComponentAlias(ComponentObject *_self, PyObject *_args)
+ {
+ 	PyObject *_res = NULL;
+ 	Component _rv;
+ 	if (!PyArg_ParseTuple(_args, ""))
+ 		return NULL;
+ 	_rv = ResolveComponentAlias(_self->ob_itself);
+ 	_res = Py_BuildValue("O&",
+ 	                     CmpObj_New, _rv);
+ 	return _res;
+ }
+ 
+ static PyObject *CmpObj_GetComponentPublicIndString(ComponentObject *_self, PyObject *_args)
+ {
+ 	PyObject *_res = NULL;
+ 	OSErr _err;
+ 	Str255 theString;
+ 	short strListID;
+ 	short index;
+ 	if (!PyArg_ParseTuple(_args, "O&hh",
+ 	                      PyMac_GetStr255, theString,
+ 	                      &strListID,
+ 	                      &index))
+ 		return NULL;
+ 	_err = GetComponentPublicIndString(_self->ob_itself,
+ 	                                   theString,
+ 	                                   strListID,
+ 	                                   index);
+ 	if (_err != noErr) return PyMac_Error(_err);
+ 	Py_INCREF(Py_None);
+ 	_res = Py_None;
+ 	return _res;
+ }
+ 
  static PyObject *CmpObj_GetComponentRefcon(ComponentObject *_self, PyObject *_args)
  {
***************
*** 484,499 ****
  }
  
- static PyObject *CmpObj_ResolveComponentAlias(ComponentObject *_self, PyObject *_args)
- {
- 	PyObject *_res = NULL;
- 	Component _rv;
- 	if (!PyArg_ParseTuple(_args, ""))
- 		return NULL;
- 	_rv = ResolveComponentAlias(_self->ob_itself);
- 	_res = Py_BuildValue("O&",
- 	                     CmpObj_New, _rv);
- 	return _res;
- }
- 
  static PyObject *CmpObj_CountComponentInstances(ComponentObject *_self, PyObject *_args)
  {
--- 518,521 ----
***************
*** 574,577 ****
--- 596,603 ----
  	{"OpenComponent", (PyCFunction)CmpObj_OpenComponent, 1,
  	 "() -> (ComponentInstance _rv)"},
+ 	{"ResolveComponentAlias", (PyCFunction)CmpObj_ResolveComponentAlias, 1,
+ 	 "() -> (Component _rv)"},
+ 	{"GetComponentPublicIndString", (PyCFunction)CmpObj_GetComponentPublicIndString, 1,
+ 	 "(Str255 theString, short strListID, short index) -> None"},
  	{"GetComponentRefcon", (PyCFunction)CmpObj_GetComponentRefcon, 1,
  	 "() -> (long _rv)"},
***************
*** 584,589 ****
  	{"GetComponentIndString", (PyCFunction)CmpObj_GetComponentIndString, 1,
  	 "(Str255 theString, short strListID, short index) -> None"},
- 	{"ResolveComponentAlias", (PyCFunction)CmpObj_ResolveComponentAlias, 1,
- 	 "() -> (Component _rv)"},
  	{"CountComponentInstances", (PyCFunction)CmpObj_CountComponentInstances, 1,
  	 "() -> (long _rv)"},
--- 610,613 ----