[Stackless-checkins] CVS: slpdev/src/2.2/src/Python getversion.c, 1.3, 1.4 pystate.c, 1.8, 1.9 pythonrun.c, 1.9, 1.10 sysmodule.c, 1.7, 1.8 thread_pthread.h, 1.2, 1.3 traceback.c, 1.7, 1.8
Christian Tismer
tismer at centera.de
Sat May 1 02:44:43 CEST 2004
- Previous message: [Stackless-checkins] CVS: slpdev/src/2.2/src/PCbuild _socket.dsp, 1.4, 1.5 _sre.dsp, 1.5, 1.6 _symtable.dsp, 1.4, 1.5 _testcapi.dsp, 1.4, 1.5 _tkinter.dsp, 1.7, 1.8 bsddb.dsp, 1.4, 1.5 mmap.dsp, 1.3, 1.4 parser.dsp, 1.3, 1.4 pcbuild.dsw, 1.13, 1.14 pyexpat.dsp, 1.3, 1.4 python.dsp, 1.5, 1.6 pythoncore.dsp, 1.47, 1.48 pythonw.dsp, 1.3, 1.4 select.dsp, 1.3, 1.4 unicodedata.dsp, 1.3, 1.4 w9xpopen.dsp, 1.2, 1.3 winreg.dsp, 1.3, 1.4 winsound.dsp, 1.3, 1.4 zlib.dsp, 1.3, 1.4
- Next message: [Stackless-checkins] CVS: slpdev/src/2.2/src/Tools/scripts dutree.doc, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/slpdev/src/2.2/src/Python
In directory centera.de:/home/tismer/slpdev/src/2.2/src/Python
Modified Files:
getversion.c pystate.c pythonrun.c sysmodule.c
thread_pthread.h traceback.c
Log Message:
hopefully this is now a base version
Index: getversion.c
===================================================================
RCS file: /home/cvs/slpdev/src/2.2/src/Python/getversion.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** getversion.c 11 Jul 2002 20:52:41 -0000 1.3
--- getversion.c 1 May 2004 00:44:39 -0000 1.4
***************
*** 6,24 ****
#include "patchlevel.h"
- #ifdef STACKLESS
- /* avoiding to recompile everything for Stackless all the time */
- #include "stackless_version.h"
-
- const char *
- Py_GetVersion(void)
- {
- static char version[250];
- PyOS_snprintf(version, sizeof(version), "%.80s Stackless %.80s (%.80s) %.80s",
- PY_VERSION, STACKLESS_VERSION, Py_GetBuildInfo(), Py_GetCompiler());
- return version;
- }
-
- #else
-
const char *
Py_GetVersion(void)
--- 6,9 ----
***************
*** 29,32 ****
return version;
}
-
- #endif
--- 14,15 ----
Index: pystate.c
===================================================================
RCS file: /home/cvs/slpdev/src/2.2/src/Python/pystate.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** pystate.c 6 Jan 2004 02:40:23 -0000 1.8
--- pystate.c 1 May 2004 00:44:39 -0000 1.9
***************
*** 38,41 ****
--- 38,42 ----
unaryfunc _PyThreadState_GetFrame = NULL;
+
PyInterpreterState *
PyInterpreterState_New(void)
***************
*** 157,163 ****
tstate->c_profileobj = NULL;
tstate->c_traceobj = NULL;
! #ifdef STACKLESS
! STACKLESS_PYSTATE_NEW;
! #endif
HEAD_LOCK();
tstate->next = interp->tstate_head;
--- 158,162 ----
tstate->c_profileobj = NULL;
tstate->c_traceobj = NULL;
!
HEAD_LOCK();
tstate->next = interp->tstate_head;
***************
*** 173,181 ****
PyThreadState_Clear(PyThreadState *tstate)
{
! #ifdef STACKLESS
! STACKLESS_PYSTATE_ZAP;
! #endif
!
! if (Py_VerboseFlag && tstate->frame != NULL)
fprintf(stderr,
"PyThreadState_Clear: warning: thread still has a frame\n");
--- 172,176 ----
PyThreadState_Clear(PyThreadState *tstate)
{
! if (Py_VerboseFlag && tstate->frame != NULL)
fprintf(stderr,
"PyThreadState_Clear: warning: thread still has a frame\n");
Index: pythonrun.c
===================================================================
RCS file: /home/cvs/slpdev/src/2.2/src/Python/pythonrun.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** pythonrun.c 6 Jan 2004 02:40:23 -0000 1.9
--- pythonrun.c 1 May 2004 00:44:39 -0000 1.10
***************
*** 14,21 ****
#include "marshal.h"
- #ifdef STACKLESS
- #include "stackless_impl.h"
- #endif
-
#ifdef HAVE_SIGNAL_H
#include <signal.h>
--- 14,17 ----
***************
*** 132,139 ****
_Py_ReadyTypes();
- #ifdef STACKLESS
- _PyStackless_InitTypes();
- #endif
-
interp->modules = PyDict_New();
if (interp->modules == NULL)
--- 128,131 ----
***************
*** 161,167 ****
interp->modules);
- #ifdef STACKLESS
- _PyStackless_Init();
- #endif
_PyImport_Init();
--- 153,156 ----
***************
*** 217,223 ****
*/
call_sys_exitfunc();
- #ifdef STACKLESS
- PyStackless_kill_tasks_with_stacks();
- #endif
initialized = 0;
--- 206,209 ----
***************
*** 269,279 ****
PyInt_Fini();
PyFloat_Fini();
#ifdef Py_USING_UNICODE
/* Cleanup Unicode implementation */
_PyUnicode_Fini();
#endif
- #ifdef STACKLESS
- PyStacklessEval_Fini();
- #endif
/* XXX Still allocated:
--- 255,263 ----
PyInt_Fini();
PyFloat_Fini();
+
#ifdef Py_USING_UNICODE
/* Cleanup Unicode implementation */
_PyUnicode_Fini();
#endif
/* XXX Still allocated:
Index: sysmodule.c
===================================================================
RCS file: /home/cvs/slpdev/src/2.2/src/Python/sysmodule.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** sysmodule.c 29 Dec 2003 01:38:30 -0000 1.7
--- sysmodule.c 1 May 2004 00:44:39 -0000 1.8
***************
*** 254,262 ****
int what, PyObject *arg)
{
! #ifdef STACKLESS
! register PyThreadState *tstate = PyThreadState_GET();
! #else
! register PyThreadState *tstate = frame->f_tstate;
! #endif
PyObject *result;
--- 254,258 ----
int what, PyObject *arg)
{
! PyThreadState *tstate = frame->f_tstate;
PyObject *result;
***************
*** 276,284 ****
int what, PyObject *arg)
{
! #ifdef STACKLESS
! register PyThreadState *tstate = PyThreadState_GET();
! #else
! register PyThreadState *tstate = frame->f_tstate;
! #endif
PyObject *callback;
PyObject *result;
--- 272,276 ----
int what, PyObject *arg)
{
! PyThreadState *tstate = frame->f_tstate;
PyObject *callback;
PyObject *result;
Index: thread_pthread.h
===================================================================
RCS file: /home/cvs/slpdev/src/2.2/src/Python/thread_pthread.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** thread_pthread.h 21 Aug 2003 16:59:17 -0000 1.2
--- thread_pthread.h 1 May 2004 00:44:39 -0000 1.3
***************
*** 214,220 ****
#if defined(PY_PTHREAD_D4) || defined(PY_PTHREAD_D6) || defined(PY_PTHREAD_D7)
! pthread_detach(&th);
#elif defined(PY_PTHREAD_STD)
! pthread_detach(th);
#endif
--- 214,220 ----
#if defined(PY_PTHREAD_D4) || defined(PY_PTHREAD_D6) || defined(PY_PTHREAD_D7)
! pthread_detach(&th);
#elif defined(PY_PTHREAD_STD)
! pthread_detach(th);
#endif
Index: traceback.c
===================================================================
RCS file: /home/cvs/slpdev/src/2.2/src/Python/traceback.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** traceback.c 29 Dec 2003 01:38:30 -0000 1.7
--- traceback.c 1 May 2004 00:44:39 -0000 1.8
***************
*** 15,120 ****
int tb_lasti;
int tb_lineno;
- #ifdef STACKLESS
- int tb_is_head; /* helper for pickling */
- #endif
} tracebackobject;
#define OFF(x) offsetof(tracebackobject, x)
- #ifdef STACKLESS
-
- static PyMemberDef tb_memberlist[] = {
- {"tb_next", T_OBJECT, OFF(tb_next), RO},
- {"tb_frame", T_OBJECT, OFF(tb_frame), RO},
- {"tb_lasti", T_INT, OFF(tb_lasti), RO},
- {"tb_lineno", T_INT, OFF(tb_lineno), RO},
- {NULL} /* Sentinel */
- };
-
- static PyObject *
- tb_reduce(tracebackobject * tb)
- {
- PyObject *tup = NULL, *lis;
- tracebackobject *tb_next;
- if (!tb->tb_is_head) {
- tup = Py_BuildValue("(O(Oii))",
- &PyTraceBack_Type,
- tb->tb_frame, tb->tb_lasti, tb->tb_lineno);
- if (tup == NULL) return NULL;
- return tup;
- }
- lis = PyList_New(0);
- if (lis == NULL) return NULL;
- tb_next = tb->tb_next;
- while (tb_next != NULL) {
- if (PyList_Append(lis, (PyObject *) tb_next))
- goto err_exit;
- tb_next = tb_next->tb_next;
- }
-
- tup = Py_BuildValue("(O(OiiO))",
- &PyTraceBack_Type,
- tb->tb_frame, tb->tb_lasti, tb->tb_lineno,
- lis);
-
- err_exit:
- Py_XDECREF(lis);
- return tup;
- }
-
- static PyMethodDef tb_methodlist[] = {
- {"__reduce__", (PyCFunction)tb_reduce, METH_NOARGS, NULL},
- {NULL, NULL}
- };
-
- static tracebackobject *
- newtracebackobject(tracebackobject *next, PyFrameObject *frame, int lasti,
- int lineno);
-
- static
- PyObject *
- traceback_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
- {
- tracebackobject *tb;
- PyFrameObject *frame;
- int lasti, lineno;
- PyObject *lis = NULL;
-
- if (kwds != NULL) {
- PyErr_SetString(PyExc_ValueError, "Keyword parameters not supported for traceback_new");
- return NULL;
- }
- if (!PyArg_ParseTuple(args, "O!ii|O!:traceback",
- PyBaseFrame_Type, &frame,
- &lasti, &lineno,
- &PyList_Type, &lis))
- return NULL;
-
- tb = newtracebackobject(NULL, frame, lasti, lineno);
- if (tb == NULL)
- return NULL;
-
- if (lis != NULL) {
- int i;
- tracebackobject *tb_curr = tb, *tb_next;
- for (i=0; i < PyList_GET_SIZE(lis); ++i) {
- tb_next = (tracebackobject *) PyList_GET_ITEM(lis, i);
- if (!PyTraceBack_Check(tb_next)) {
- PyErr_SetString(PyExc_TypeError,
- "list of tracebacks expected in traceback()");
- Py_DECREF(tb);
- return NULL;
- }
- tb_curr->tb_next = tb_next;
- tb_curr = tb_next;
- Py_INCREF(tb_next);
- }
- tb->tb_is_head = 1;
- }
- return (PyObject *) tb;
- }
-
- #else
-
static struct memberlist tb_memberlist[] = {
{"tb_next", T_OBJECT, OFF(tb_next)},
--- 15,22 ----
***************
*** 130,134 ****
return PyMember_Get((char *)tb, tb_memberlist, name);
}
- #endif
static void
--- 32,35 ----
***************
*** 174,182 ****
(destructor)tb_dealloc, /*tp_dealloc*/
0, /*tp_print*/
- #ifdef STACKLESS
- 0,
- #else
(getattrfunc)tb_getattr, /*tp_getattr*/
- #endif
0, /*tp_setattr*/
0, /*tp_compare*/
--- 75,79 ----
***************
*** 188,196 ****
0, /* tp_call */
0, /* tp_str */
- #ifdef STACKLESS
- PyObject_GenericGetAttr,
- #else
0, /* tp_getattro */
- #endif
0, /* tp_setattro */
0, /* tp_as_buffer */
--- 85,89 ----
***************
*** 203,224 ****
0, /* tp_iter */
0, /* tp_iternext */
- #ifdef STACKLESS
- tb_methodlist, /* tp_methods */
- tb_memberlist, /* tp_members */
- #else
0, /* tp_methods */
! 0, /* tp_members */
! #endif
! 0, /* tp_getset */
0, /* tp_base */
0, /* tp_dict */
- #ifdef STACKLESS
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- 0, /* tp_init */
- 0, /* tp_alloc */
- traceback_new, /* tp_new */
- #endif
};
--- 96,104 ----
0, /* tp_iter */
0, /* tp_iternext */
0, /* tp_methods */
! 0, /* tp_members */
! 0, /* tp_getset */
0, /* tp_base */
0, /* tp_dict */
};
***************
*** 241,247 ****
tb->tb_lasti = lasti;
tb->tb_lineno = lineno;
- #ifdef STACKLESS
- tb->tb_is_head = 0;
- #endif
_PyObject_GC_TRACK(tb);
}
--- 121,124 ----
***************
*** 252,260 ****
PyTraceBack_Here(PyFrameObject *frame)
{
! #ifdef STACKLESS
! register PyThreadState *tstate = PyThreadState_GET();
! #else
! register PyThreadState *tstate = frame->f_tstate;
! #endif
tracebackobject *oldtb = (tracebackobject *) tstate->curexc_traceback;
tracebackobject *tb = newtracebackobject(oldtb,
--- 129,133 ----
PyTraceBack_Here(PyFrameObject *frame)
{
! PyThreadState *tstate = frame->f_tstate;
tracebackobject *oldtb = (tracebackobject *) tstate->curexc_traceback;
tracebackobject *tb = newtracebackobject(oldtb,
***************
*** 263,275 ****
return -1;
tstate->curexc_traceback = (PyObject *)tb;
- #ifdef STACKLESS
- if (oldtb != NULL) {
- oldtb->tb_is_head = 0;
- tb->tb_is_head = 1;
- Py_DECREF(oldtb);
- }
- #else
Py_XDECREF(oldtb);
- #endif
return 0;
}
--- 136,140 ----
_______________________________________________
Stackless-checkins mailing list
Stackless-checkins at stackless.com
http://www.stackless.com/mailman/listinfo/stackless-checkins
- Previous message: [Stackless-checkins] CVS: slpdev/src/2.2/src/PCbuild _socket.dsp, 1.4, 1.5 _sre.dsp, 1.5, 1.6 _symtable.dsp, 1.4, 1.5 _testcapi.dsp, 1.4, 1.5 _tkinter.dsp, 1.7, 1.8 bsddb.dsp, 1.4, 1.5 mmap.dsp, 1.3, 1.4 parser.dsp, 1.3, 1.4 pcbuild.dsw, 1.13, 1.14 pyexpat.dsp, 1.3, 1.4 python.dsp, 1.5, 1.6 pythoncore.dsp, 1.47, 1.48 pythonw.dsp, 1.3, 1.4 select.dsp, 1.3, 1.4 unicodedata.dsp, 1.3, 1.4 w9xpopen.dsp, 1.2, 1.3 winreg.dsp, 1.3, 1.4 winsound.dsp, 1.3, 1.4 zlib.dsp, 1.3, 1.4
- Next message: [Stackless-checkins] CVS: slpdev/src/2.2/src/Tools/scripts dutree.doc, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Stackless-checkins
mailing list