comparison Python/pythonrun.c @ 12576:1c7c2dd1beb1 legacy-trunk

Vladimir Marangozov's long-awaited malloc restructuring. For more comments, read the patches@python.org archives. For documentation read the comments in mymalloc.h and objimpl.h. (This is not exactly what Vladimir posted to the patches list; I've made a few changes, and Vladimir sent me a fix in private email for a problem that only occurs in debug mode. I'm also holding back on his change to main.c, which seems unnecessary to me.)
author Guido van Rossum <guido@python.org>
date Wed, 03 May 2000 23:44:39 +0000
parents 04cf788d862b
children 5213abfe5230
comparison
equal deleted inserted replaced
12575:8ba8b5857e89 12576:1c7c2dd1beb1
541 Py_XDECREF(v); 541 Py_XDECREF(v);
542 Py_XDECREF(w); 542 Py_XDECREF(w);
543 if (n == NULL) { 543 if (n == NULL) {
544 if (err.error == E_EOF) { 544 if (err.error == E_EOF) {
545 if (err.text) 545 if (err.text)
546 free(err.text); 546 PyMem_DEL(err.text);
547 return E_EOF; 547 return E_EOF;
548 } 548 }
549 err_input(&err); 549 err_input(&err);
550 PyErr_Print(); 550 PyErr_Print();
551 return err.error; 551 return err.error;
1007 PyObject *v, *w; 1007 PyObject *v, *w;
1008 char *msg = NULL; 1008 char *msg = NULL;
1009 v = Py_BuildValue("(ziiz)", err->filename, 1009 v = Py_BuildValue("(ziiz)", err->filename,
1010 err->lineno, err->offset, err->text); 1010 err->lineno, err->offset, err->text);
1011 if (err->text != NULL) { 1011 if (err->text != NULL) {
1012 free(err->text); 1012 PyMem_DEL(err->text);
1013 err->text = NULL; 1013 err->text = NULL;
1014 } 1014 }
1015 switch (err->error) { 1015 switch (err->error) {
1016 case E_SYNTAX: 1016 case E_SYNTAX:
1017 msg = "invalid syntax"; 1017 msg = "invalid syntax";