[Python-checkins] CVS: python/dist/src/Mac/Modules/cm Cmmodule.c,1.13,1.14

Jack Jansen jackjansen@users.sourceforge.net
Tue, 22 May 2001 14:51:31 -0700


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

Modified Files:
	Cmmodule.c 
Log Message:
Lots more Carbon/Carbon.h includes, new UPP routine names, function prototypes. Most toolbox modules now compile, link and import in MacOSX-MachO python.

Index: Cmmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/cm/Cmmodule.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** Cmmodule.c	2001/05/17 21:54:29	1.13
--- Cmmodule.c	2001/05/22 21:51:29	1.14
***************
*** 9,13 ****
--- 9,18 ----
  #include "pymactoolbox.h"
  
+ #ifdef WITHOUT_FRAMEWORKS
  #include <Components.h>
+ #else
+ #include <Carbon/Carbon.h>
+ #endif
+ 
  #ifdef USE_TOOLBOX_OBJECT_GLUE
  extern PyObject *_CmpObj_New(Component);
***************
*** 26,31 ****
  */
  static PyObject *
! CmpDesc_New(itself)
! 	ComponentDescription *itself;
  {
  
--- 31,35 ----
  */
  static PyObject *
! CmpDesc_New(ComponentDescription *itself)
  {
  
***************
*** 38,44 ****
  
  static int
! CmpDesc_Convert(v, p_itself)
! 	PyObject *v;
! 	ComponentDescription *p_itself;
  {
  	return PyArg_ParseTuple(v, "O&O&O&ll",
--- 42,46 ----
  
  static int
! CmpDesc_Convert(PyObject *v, ComponentDescription *p_itself)
  {
  	return PyArg_ParseTuple(v, "O&O&O&ll",
***************
*** 63,68 ****
  } ComponentInstanceObject;
  
! PyObject *CmpInstObj_New(itself)
! 	ComponentInstance itself;
  {
  	ComponentInstanceObject *it;
--- 65,69 ----
  } ComponentInstanceObject;
  
! PyObject *CmpInstObj_New(ComponentInstance itself)
  {
  	ComponentInstanceObject *it;
***************
*** 76,82 ****
  	return (PyObject *)it;
  }
! CmpInstObj_Convert(v, p_itself)
! 	PyObject *v;
! 	ComponentInstance *p_itself;
  {
  	if (!CmpInstObj_Check(v))
--- 77,81 ----
  	return (PyObject *)it;
  }
! CmpInstObj_Convert(PyObject *v, ComponentInstance *p_itself)
  {
  	if (!CmpInstObj_Check(v))
***************
*** 89,94 ****
  }
  
! static void CmpInstObj_dealloc(self)
! 	ComponentInstanceObject *self;
  {
  	/* Cleanup of self->ob_itself goes here */
--- 88,92 ----
  }
  
! static void CmpInstObj_dealloc(ComponentInstanceObject *self)
  {
  	/* Cleanup of self->ob_itself goes here */
***************
*** 96,102 ****
  }
  
! static PyObject *CmpInstObj_CloseComponent(_self, _args)
! 	ComponentInstanceObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 94,98 ----
  }
  
! static PyObject *CmpInstObj_CloseComponent(ComponentInstanceObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 111,117 ****
  }
  
! static PyObject *CmpInstObj_GetComponentInstanceError(_self, _args)
! 	ComponentInstanceObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 107,111 ----
  }
  
! static PyObject *CmpInstObj_GetComponentInstanceError(ComponentInstanceObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 126,132 ****
  }
  
! static PyObject *CmpInstObj_SetComponentInstanceError(_self, _args)
! 	ComponentInstanceObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 120,124 ----
  }
  
! static PyObject *CmpInstObj_SetComponentInstanceError(ComponentInstanceObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 142,148 ****
  }
  
! static PyObject *CmpInstObj_GetComponentInstanceStorage(_self, _args)
! 	ComponentInstanceObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 134,138 ----
  }
  
! static PyObject *CmpInstObj_GetComponentInstanceStorage(ComponentInstanceObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 156,162 ****
  }
  
! static PyObject *CmpInstObj_SetComponentInstanceStorage(_self, _args)
! 	ComponentInstanceObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 146,150 ----
  }
  
! static PyObject *CmpInstObj_SetComponentInstanceStorage(ComponentInstanceObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 174,180 ****
  #if !TARGET_API_MAC_CARBON
  
! static PyObject *CmpInstObj_GetComponentInstanceA5(_self, _args)
! 	ComponentInstanceObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 162,166 ----
  #if !TARGET_API_MAC_CARBON
  
! static PyObject *CmpInstObj_GetComponentInstanceA5(ComponentInstanceObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 191,197 ****
  #if !TARGET_API_MAC_CARBON
  
! static PyObject *CmpInstObj_SetComponentInstanceA5(_self, _args)
! 	ComponentInstanceObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 177,181 ----
  #if !TARGET_API_MAC_CARBON
  
! static PyObject *CmpInstObj_SetComponentInstanceA5(ComponentInstanceObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 208,214 ****
  #endif
  
! static PyObject *CmpInstObj_ComponentFunctionImplemented(_self, _args)
! 	ComponentInstanceObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 192,196 ----
  #endif
  
! static PyObject *CmpInstObj_ComponentFunctionImplemented(ComponentInstanceObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 225,231 ****
  }
  
! static PyObject *CmpInstObj_GetComponentVersion(_self, _args)
! 	ComponentInstanceObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 207,211 ----
  }
  
! static PyObject *CmpInstObj_GetComponentVersion(ComponentInstanceObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 239,245 ****
  }
  
! static PyObject *CmpInstObj_ComponentSetTarget(_self, _args)
! 	ComponentInstanceObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 219,223 ----
  }
  
! static PyObject *CmpInstObj_ComponentSetTarget(ComponentInstanceObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 288,294 ****
  PyMethodChain CmpInstObj_chain = { CmpInstObj_methods, NULL };
  
! static PyObject *CmpInstObj_getattr(self, name)
! 	ComponentInstanceObject *self;
! 	char *name;
  {
  	return Py_FindMethodInChain(&CmpInstObj_chain, (PyObject *)self, name);
--- 266,270 ----
  PyMethodChain CmpInstObj_chain = { CmpInstObj_methods, NULL };
  
! static PyObject *CmpInstObj_getattr(ComponentInstanceObject *self, char *name)
  {
  	return Py_FindMethodInChain(&CmpInstObj_chain, (PyObject *)self, name);
***************
*** 336,341 ****
  } ComponentObject;
  
! PyObject *CmpObj_New(itself)
! 	Component itself;
  {
  	ComponentObject *it;
--- 312,316 ----
  } ComponentObject;
  
! PyObject *CmpObj_New(Component itself)
  {
  	ComponentObject *it;
***************
*** 350,356 ****
  	return (PyObject *)it;
  }
! CmpObj_Convert(v, p_itself)
! 	PyObject *v;
! 	Component *p_itself;
  {
  	if ( v == Py_None ) {
--- 325,329 ----
  	return (PyObject *)it;
  }
! CmpObj_Convert(PyObject *v, Component *p_itself)
  {
  	if ( v == Py_None ) {
***************
*** 367,372 ****
  }
  
! static void CmpObj_dealloc(self)
! 	ComponentObject *self;
  {
  	/* Cleanup of self->ob_itself goes here */
--- 340,344 ----
  }
  
! static void CmpObj_dealloc(ComponentObject *self)
  {
  	/* Cleanup of self->ob_itself goes here */
***************
*** 374,380 ****
  }
  
! static PyObject *CmpObj_UnregisterComponent(_self, _args)
! 	ComponentObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 346,350 ----
  }
  
! static PyObject *CmpObj_UnregisterComponent(ComponentObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 389,395 ****
  }
  
! static PyObject *CmpObj_GetComponentInfo(_self, _args)
! 	ComponentObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 359,363 ----
  }
  
! static PyObject *CmpObj_GetComponentInfo(ComponentObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 415,421 ****
  }
  
! static PyObject *CmpObj_OpenComponent(_self, _args)
! 	ComponentObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 383,387 ----
  }
  
! static PyObject *CmpObj_OpenComponent(ComponentObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 429,435 ****
  }
  
! static PyObject *CmpObj_GetComponentRefcon(_self, _args)
! 	ComponentObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 395,399 ----
  }
  
! static PyObject *CmpObj_GetComponentRefcon(ComponentObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 443,449 ****
  }
  
! static PyObject *CmpObj_SetComponentRefcon(_self, _args)
! 	ComponentObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 407,411 ----
  }
  
! static PyObject *CmpObj_SetComponentRefcon(ComponentObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 459,465 ****
  }
  
! static PyObject *CmpObj_OpenComponentResFile(_self, _args)
! 	ComponentObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 421,425 ----
  }
  
! static PyObject *CmpObj_OpenComponentResFile(ComponentObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 473,479 ****
  }
  
! static PyObject *CmpObj_GetComponentResource(_self, _args)
! 	ComponentObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 433,437 ----
  }
  
! static PyObject *CmpObj_GetComponentResource(ComponentObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 496,502 ****
  }
  
! static PyObject *CmpObj_GetComponentIndString(_self, _args)
! 	ComponentObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 454,458 ----
  }
  
! static PyObject *CmpObj_GetComponentIndString(ComponentObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 520,526 ****
  }
  
! static PyObject *CmpObj_ResolveComponentAlias(_self, _args)
! 	ComponentObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 476,480 ----
  }
  
! static PyObject *CmpObj_ResolveComponentAlias(ComponentObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 534,540 ****
  }
  
! static PyObject *CmpObj_CountComponentInstances(_self, _args)
! 	ComponentObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 488,492 ----
  }
  
! static PyObject *CmpObj_CountComponentInstances(ComponentObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 548,554 ****
  }
  
! static PyObject *CmpObj_SetDefaultComponent(_self, _args)
! 	ComponentObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 500,504 ----
  }
  
! static PyObject *CmpObj_SetDefaultComponent(ComponentObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 566,572 ****
  }
  
! static PyObject *CmpObj_CaptureComponent(_self, _args)
! 	ComponentObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 516,520 ----
  }
  
! static PyObject *CmpObj_CaptureComponent(ComponentObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 583,589 ****
  }
  
! static PyObject *CmpObj_UncaptureComponent(_self, _args)
! 	ComponentObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 531,535 ----
  }
  
! static PyObject *CmpObj_UncaptureComponent(ComponentObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 598,604 ****
  }
  
! static PyObject *CmpObj_GetComponentIconSuite(_self, _args)
! 	ComponentObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 544,548 ----
  }
  
! static PyObject *CmpObj_GetComponentIconSuite(ComponentObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 649,655 ****
  PyMethodChain CmpObj_chain = { CmpObj_methods, NULL };
  
! static PyObject *CmpObj_getattr(self, name)
! 	ComponentObject *self;
! 	char *name;
  {
  	return Py_FindMethodInChain(&CmpObj_chain, (PyObject *)self, name);
--- 593,597 ----
  PyMethodChain CmpObj_chain = { CmpObj_methods, NULL };
  
! static PyObject *CmpObj_getattr(ComponentObject *self, char *name)
  {
  	return Py_FindMethodInChain(&CmpObj_chain, (PyObject *)self, name);
***************
*** 686,692 ****
  
  
! static PyObject *Cm_RegisterComponentResource(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 628,632 ----
  
  
! static PyObject *Cm_RegisterComponentResource(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 705,711 ****
  }
  
! static PyObject *Cm_FindNextComponent(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 645,649 ----
  }
  
! static PyObject *Cm_FindNextComponent(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 724,730 ****
  }
  
! static PyObject *Cm_CountComponents(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 662,666 ----
  }
  
! static PyObject *Cm_CountComponents(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 740,746 ****
  }
  
! static PyObject *Cm_GetComponentListModSeed(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 676,680 ----
  }
  
! static PyObject *Cm_GetComponentListModSeed(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 754,760 ****
  }
  
! static PyObject *Cm_CloseComponentResFile(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 688,692 ----
  }
  
! static PyObject *Cm_CloseComponentResFile(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 771,777 ****
  }
  
! static PyObject *Cm_OpenDefaultComponent(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 703,707 ----
  }
  
! static PyObject *Cm_OpenDefaultComponent(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 790,796 ****
  }
  
! static PyObject *Cm_RegisterComponentResourceFile(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 720,724 ----
  }
  
! static PyObject *Cm_RegisterComponentResourceFile(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 830,834 ****
  
  
! void initCm()
  {
  	PyObject *m;
--- 758,762 ----
  
  
! void initCm(void)
  {
  	PyObject *m;
***************
*** 837,844 ****
  
  
! 		PyMac_INIT_TOOLBOX_OBJECT_NEW(CmpObj_New);
! 		PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CmpObj_Convert);
! 		PyMac_INIT_TOOLBOX_OBJECT_NEW(CmpInstObj_New);
! 		PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CmpInstObj_Convert);
  
  
--- 765,772 ----
  
  
! 		PyMac_INIT_TOOLBOX_OBJECT_NEW(Component, CmpObj_New);
! 		PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Component, CmpObj_Convert);
! 		PyMac_INIT_TOOLBOX_OBJECT_NEW(ComponentInstance, CmpInstObj_New);
! 		PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ComponentInstance, CmpInstObj_Convert);