[Python-checkins] python/dist/src/Objects setobject.c,NONE,1.1
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Sun Nov 16 11:17:51 EST 2003
Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1:/tmp/cvs-serv13946/Objects
Added Files:
setobject.c
Log Message:
* Migrate set() and frozenset() from the sandbox.
* Install the unittests, docs, newsitem, include file, and makefile update.
* Exercise the new functions whereever sets.py was being used.
Includes the docs for libfuncs.tex. Separate docs for the types are
forthcoming.
--- NEW FILE: setobject.c ---
#include "Python.h"
/* set object implementation
written and maintained by Raymond D. Hettinger <python at rcn.com>
derived from sets.py written by Greg V. Wilson, Alex Martelli,
Guido van Rossum, Raymond Hettinger, and Tim Peters.
Copyright (c) 2003 Python Software Foundation.
All rights reserved.
*/
/* Fast access macros */
#define DICT_CONTAINS(d, k) (d->ob_type->tp_as_sequence->sq_contains(d, k))
#define IS_SET(so) (so->ob_type == &PySet_Type || so->ob_type == &PyFrozenSet_Type)
/* set object **********************************************************/
static PyObject *
[...1034 lines suppressed...]
frozenset_doc, /* tp_doc */
(traverseproc)set_traverse, /* tp_traverse */
0, /* tp_clear */
(richcmpfunc)set_richcompare, /* tp_richcompare */
0, /* tp_weaklistoffset */
(getiterfunc)set_iter, /* tp_iter */
0, /* tp_iternext */
frozenset_methods, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
0, /* tp_base */
0, /* tp_dict */
0, /* tp_descr_get */
0, /* tp_descr_set */
0, /* tp_dictoffset */
0, /* tp_init */
PyType_GenericAlloc, /* tp_alloc */
set_new, /* tp_new */
PyObject_GC_Del, /* tp_free */
};
More information about the Python-checkins
mailing list