[Python-checkins] python/dist/src/Modules itertoolsmodule.c,NONE,1.1
rhettinger@users.sourceforge.net
rhettinger@users.sourceforge.net
Fri, 31 Jan 2003 16:10:12 -0800
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv25990/Modules
Added Files:
itertoolsmodule.c
Log Message:
Move itertools module from the sandbox and into production.
--- NEW FILE: itertoolsmodule.c ---
#include "Python.h"
/* Itertools module written and maintained
by Raymond D. Hettinger <python@rcn.com>
Copyright (c) 2003 Python Software Foundation.
All rights reserved.
*/
/* dropwhile object **********************************************************/
typedef struct {
PyObject_HEAD
PyObject *func;
PyObject *it;
long start;
} dropwhileobject;
PyTypeObject dropwhile_type;
[...1493 lines suppressed...]
if (PyType_Ready(&ifilter_type) < 0)
return;
Py_INCREF(&ifilter_type);
PyModule_AddObject(m, "ifilter", (PyObject *)&ifilter_type);
if (PyType_Ready(&count_type) < 0)
return;
Py_INCREF(&count_type);
PyModule_AddObject(m, "count", (PyObject *)&count_type);
if (PyType_Ready(&izip_type) < 0)
return;
Py_INCREF(&izip_type);
PyModule_AddObject(m, "izip", (PyObject *)&izip_type);
if (PyType_Ready(&repeat_type) < 0)
return;
Py_INCREF(&repeat_type);
PyModule_AddObject(m, "repeat", (PyObject *)&repeat_type);
}