[Python-checkins] CVS: python/dist/src/Mac/Python macgetargv.c,1.23,1.24

Jack Jansen jackjansen@users.sourceforge.net
Wed, 20 Jun 2001 13:50:21 -0700


Update of /cvsroot/python/python/dist/src/Mac/Python
In directory usw-pr-cvs1:/tmp/cvs-serv23677/MacPython/Mac/Python

Modified Files:
	macgetargv.c 
Log Message:
Adapted for Universal Headers 3.4: refcon type has changed (sigh) and use modern (UPP in stead of Proc) names for callback object creation.

Index: macgetargv.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Python/macgetargv.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** macgetargv.c	2001/05/22 22:37:05	1.23
--- macgetargv.c	2001/06/20 20:50:19	1.24
***************
*** 42,45 ****
--- 42,51 ----
  #include <Windows.h>
  
+ #if UNIVERSAL_INTERFACES_VERSION >= 0x0340
+ typedef long refcontype;
+ #else
+ typedef unsigned long refcontype;
+ #endif
+ 
  #include "Python.h"
  #include "macglue.h"
***************
*** 110,114 ****
  
  static pascal OSErr
! handle_not(const AppleEvent *theAppleEvent, AppleEvent *reply, unsigned long refCon)
  {
  	#pragma unused (reply, refCon)
--- 116,120 ----
  
  static pascal OSErr
! handle_not(const AppleEvent *theAppleEvent, AppleEvent *reply, refcontype refCon)
  {
  	#pragma unused (reply, refCon)
***************
*** 120,124 ****
  
  static pascal OSErr
! handle_open_app(const AppleEvent *theAppleEvent, AppleEvent *reply, unsigned long refCon)
  {
  	#pragma unused (reply, refCon)
--- 126,130 ----
  
  static pascal OSErr
! handle_open_app(const AppleEvent *theAppleEvent, AppleEvent *reply, refcontype refCon)
  {
  	#pragma unused (reply, refCon)
***************
*** 133,137 ****
  
  static pascal OSErr
! handle_open_doc(const AppleEvent *theAppleEvent, AppleEvent *reply, unsigned long refCon)
  {
  	#pragma unused (reply, refCon)
--- 139,143 ----
  
  static pascal OSErr
! handle_open_doc(const AppleEvent *theAppleEvent, AppleEvent *reply, refcontype refCon)
  {
  	#pragma unused (reply, refCon)
***************
*** 171,177 ****
  set_ae_handlers()
  {
! 	open_doc_upp = NewAEEventHandlerProc(handle_open_doc);
! 	open_app_upp = NewAEEventHandlerProc(handle_open_app);
! 	not_upp = NewAEEventHandlerProc(handle_not);
  	
  	AEInstallEventHandler(kCoreEventClass, kAEOpenApplication,
--- 177,183 ----
  set_ae_handlers()
  {
! 	open_doc_upp = NewAEEventHandlerUPP(&handle_open_doc);
! 	open_app_upp = NewAEEventHandlerUPP(&handle_open_app);
! 	not_upp = NewAEEventHandlerUPP(&handle_not);
  	
  	AEInstallEventHandler(kCoreEventClass, kAEOpenApplication,