[Python-checkins] CVS: python/dist/src/Mac/Python macmain.c,1.71,1.72

Just van Rossum jvr@users.sourceforge.net
Wed, 31 Oct 2001 14:54:29 -0800


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

Modified Files:
	macmain.c 
Log Message:
Moved macfsn hackery from macmain.c to macfsmodule.c so it loads
on demand instead of at startup.

Index: macmain.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Python/macmain.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -C2 -d -r1.71 -r1.72
*** macmain.c	2001/10/30 22:48:36	1.71
--- macmain.c	2001/10/31 22:54:27	1.72
***************
*** 393,421 ****
  }
  	
- /*
- ** Import the macfsn module, which will override the Standard File
- ** calls in the macfs builtin module by Navigation Services versions,
- ** if available on this machine.
- */
- static void
- PyMac_InstallNavServicesForSF(void)
- {
- 	if ( !PyMac_options.nonavservice ) {
- 		PyObject *m = PyImport_ImportModule("macfsn");
- 		
- 		if ( m == NULL ) {
- 			PySys_WriteStderr("'import macfsn' failed; ");
- 			if (Py_VerboseFlag) {
- 				PySys_WriteStderr("traceback:\n");
- 				PyErr_Print();
- 			}
- 			else {
- 				PySys_WriteStderr("use -v for traceback\n");
- 			}
- 			PyErr_Clear();
- 		}
- 	}
- }
- 
  #ifdef USE_MAC_APPLET_SUPPORT
  /* Applet support */
--- 393,396 ----
***************
*** 465,469 ****
  	
  	Py_Initialize();
- 	PyMac_InstallNavServicesForSF();
  	PySys_SetArgv(argc, argv);
  	
--- 440,443 ----
***************
*** 489,493 ****
  	init_common(&argc, &argv, 1);
  	Py_Initialize();
- 	PyMac_InstallNavServicesForSF();
  	PySys_SetArgv(argc, argv);
  }
--- 463,466 ----
***************
*** 676,681 ****
  	PyUnicode_SetDefaultEncoding(PyMac_getscript());
  	
- 	PyMac_InstallNavServicesForSF();
- 
  	PySys_SetArgv(argc, argv);
  
--- 649,652 ----