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

Jack Jansen jackjansen@users.sourceforge.net
Thu, 23 Aug 2001 06:59:01 -0700


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

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

--- NEW FILE: _Sndmodule.c ---

/* ========================== Module _Snd =========================== */

#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
[...1423 lines suppressed...]


	m = Py_InitModule("_Snd", Snd_methods);
	d = PyModule_GetDict(m);
	Snd_Error = PyMac_GetOSErrException();
	if (Snd_Error == NULL ||
	    PyDict_SetItemString(d, "Error", Snd_Error) != 0)
		return;
	SndChannel_Type.ob_type = &PyType_Type;
	Py_INCREF(&SndChannel_Type);
	if (PyDict_SetItemString(d, "SndChannelType", (PyObject *)&SndChannel_Type) != 0)
		Py_FatalError("can't initialize SndChannelType");
	SPB_Type.ob_type = &PyType_Type;
	Py_INCREF(&SPB_Type);
	if (PyDict_SetItemString(d, "SPBType", (PyObject *)&SPB_Type) != 0)
		Py_FatalError("can't initialize SPBType");
}

/* ======================== End module _Snd ========================= */