[Python-checkins] CVS: python/dist/src/Mac/Modules/list _Listmodule.c,NONE,1.1

Jack Jansen jackjansen@users.sourceforge.net
Thu, 23 Aug 2001 07:00:34 -0700


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

Added Files:
	_Listmodule.c 
Log Message:
Renamed the Mac toolbox modules to have an initial _ in their name.

--- NEW FILE: _Listmodule.c ---

/* ========================== Module _List ========================== */

#include "Python.h"



#include "macglue.h"
#include "pymactoolbox.h"

/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
    	PyErr_SetString(PyExc_NotImplementedError, \
    	"Not available in this shared library/OS version"); \
    	return NULL; \
    }} while(0)


#ifdef WITHOUT_FRAMEWORKS
[...970 lines suppressed...]


		PyMac_INIT_TOOLBOX_OBJECT_NEW(ListHandle, ListObj_New);
		PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ListHandle, ListObj_Convert);


	m = Py_InitModule("_List", List_methods);
	d = PyModule_GetDict(m);
	List_Error = PyMac_GetOSErrException();
	if (List_Error == NULL ||
	    PyDict_SetItemString(d, "Error", List_Error) != 0)
		return;
	List_Type.ob_type = &PyType_Type;
	Py_INCREF(&List_Type);
	if (PyDict_SetItemString(d, "ListType", (PyObject *)&List_Type) != 0)
		Py_FatalError("can't initialize ListType");
}

/* ======================== End module _List ======================== */