[Python-checkins] CVS: python/dist/src/Mac/Modules/win winsupport.py,1.23,1.24

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


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

Modified Files:
	winsupport.py 
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: winsupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/win/winsupport.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** winsupport.py	2001/05/17 21:58:34	1.23
--- winsupport.py	2001/05/22 21:56:42	1.24
***************
*** 55,59 ****
  
  includestuff = includestuff + """
! #include <%s>""" % MACHEADERFILE + """
  
  #ifdef USE_TOOLBOX_OBJECT_GLUE
--- 55,63 ----
  
  includestuff = includestuff + """
! #ifdef WITHOUT_FRAMEWORKS
! #include <Windows.h>
! #else
! #include <Carbon/Carbon.h>
! #endif
  
  #ifdef USE_TOOLBOX_OBJECT_GLUE
***************
*** 93,98 ****
  
  PyObject *
! WinObj_WhichWindow(w)
! 	WindowPtr w;
  {
  	PyObject *it;
--- 97,101 ----
  
  PyObject *
! WinObj_WhichWindow(WindowPtr w)
  {
  	PyObject *it;
***************
*** 115,121 ****
  
  initstuff = initstuff + """
! 	PyMac_INIT_TOOLBOX_OBJECT_NEW(WinObj_New);
! 	PyMac_INIT_TOOLBOX_OBJECT_NEW(WinObj_WhichWindow);
! 	PyMac_INIT_TOOLBOX_OBJECT_CONVERT(WinObj_Convert);
  """
  
--- 118,124 ----
  
  initstuff = initstuff + """
! 	PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_New);
! 	PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_WhichWindow);
! 	PyMac_INIT_TOOLBOX_OBJECT_CONVERT(WindowPtr, WinObj_Convert);
  """
  
***************
*** 165,172 ****
  	def outputCompare(self):
  		Output()
! 		Output("static int %s_compare(self, other)", self.prefix)
! 		IndentLevel()
! 		Output("%s *self, *other;", self.objecttype)
! 		DedentLevel()
  		OutLbrace()
  		Output("if ( self->ob_itself > other->ob_itself ) return 1;")
--- 168,172 ----
  	def outputCompare(self):
  		Output()
! 		Output("static int %s_compare(%s *self, %s *other)", self.prefix, self.objecttype, self.objecttype)
  		OutLbrace()
  		Output("if ( self->ob_itself > other->ob_itself ) return 1;")
***************
*** 177,184 ****
  	def outputHash(self):
  		Output()
! 		Output("static int %s_hash(self)", self.prefix)
! 		IndentLevel()
! 		Output("%s *self;", self.objecttype)
! 		DedentLevel()
  		OutLbrace()
  		Output("return (int)self->ob_itself;")
--- 177,181 ----
  	def outputHash(self):
  		Output()
! 		Output("static int %s_hash(%s *self)", self.prefix, self.objecttype)
  		OutLbrace()
  		Output("return (int)self->ob_itself;")
***************
*** 187,194 ****
  	def outputRepr(self):
  		Output()
! 		Output("static PyObject * %s_repr(self)", self.prefix)
! 		IndentLevel()
! 		Output("%s *self;", self.objecttype)
! 		DedentLevel()
  		OutLbrace()
  		Output("char buf[100];")
--- 184,188 ----
  	def outputRepr(self):
  		Output()
! 		Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype)
  		OutLbrace()
  		Output("char buf[100];")