[Stackless-checkins] CVS: slpdev/src/2.2/src/Modules cPickle.c, 1.9, 1.10 socketmodule.c, 1.3, 1.4
Christian Tismer
tismer at centera.de
Mon May 3 18:54:32 CEST 2004
Update of /home/cvs/slpdev/src/2.2/src/Modules
In directory centera.de:/tmp/cvs-serv20604/src/2.2/src/Modules
Modified Files:
cPickle.c socketmodule.c
Log Message:
completely back-ported Stackless to Python 2.2.3.
It passes all relevant tests, supports pickling etc.
The gola is to keep the core files identical as long
as possible. This caused a few changes to the test files,
which need to figure out which tests to omit, for instance.
This 2.2.3 versiion is almost identical to the original, but
a few changes:
- Pickling does not check for __safe_for_unpickling__
- Generators don't need from __future__ import generators
- code objects have a builtin tp_new method.
These changes *all* vanish if STACKLESS_OFF is defined.
Index: cPickle.c
===================================================================
RCS file: /home/cvs/slpdev/src/2.2/src/Modules/cPickle.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** cPickle.c 1 May 2004 20:31:00 -0000 1.9
--- cPickle.c 3 May 2004 16:54:28 -0000 1.10
***************
*** 95,99 ****
--- 95,103 ----
static PyObject *__class___str, *__getinitargs___str, *__dict___str,
*__getstate___str, *__setstate___str, *__name___str, *__reduce___str,
+ #ifdef STACKLESS
+ *write_str, *append_str,
+ #else
*write_str, *__safe_for_unpickling___str, *append_str,
+ #endif
*read_str, *readline_str, *__main___str, *__basicnew___str,
*copy_reg_str, *dispatch_table_str, *safe_constructors_str;
***************
*** 1958,1962 ****
if (ret == NULL) return -1;
if (ret != Py_None) {
! if (! PyArg_UnpackTuple(args, "save_reduce", 2, 3,
&callable,
&argtup,
--- 1962,1966 ----
if (ret == NULL) return -1;
if (ret != Py_None) {
! if (! PyArg_UnpackTuple(ret, "save_reduce", 2, 3,
&callable,
&argtup,
***************
*** 3146,3149 ****
--- 3150,3154 ----
has_key = cPickle_PyMapping_HasKey(safe_constructors, cls);
if (!has_key)
+ #ifndef STACKLESS
if (!(safe = PyObject_GetAttr(cls, __safe_for_unpickling___str)) ||
!PyObject_IsTrue(safe)) {
***************
*** 3153,3156 ****
--- 3158,3162 ----
return NULL;
}
+ #endif
if (args==Py_None) {
***************
*** 4703,4707 ****
--- 4709,4715 ----
INIT_STR(__reduce__);
INIT_STR(write);
+ #ifndef STACKLESS
INIT_STR(__safe_for_unpickling__);
+ #endif
INIT_STR(append);
INIT_STR(read);
Index: socketmodule.c
===================================================================
RCS file: /home/cvs/slpdev/src/2.2/src/Modules/socketmodule.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** socketmodule.c 1 May 2004 01:21:10 -0000 1.3
--- socketmodule.c 3 May 2004 16:54:29 -0000 1.4
***************
*** 148,156 ****
#endif
- /* This declaration is required for HPUX 10 */
- #if defined(__hpux) && !defined(h_errno)
- extern int h_errno;
- #endif
-
/* Headers needed for inet_ntoa() and inet_addr() */
#ifdef __BEOS__
--- 148,151 ----
_______________________________________________
Stackless-checkins mailing list
Stackless-checkins at stackless.com
http://www.stackless.com/mailman/listinfo/stackless-checkins
More information about the Stackless-checkins
mailing list