[Python-checkins] CVS: python/dist/src/Python exceptions.c,1.10,1.11
Thomas Wouters
python-dev@python.org
Sat, 22 Jul 2000 11:45:08 -0700
- Previous message: [Python-checkins] CVS: python/dist/src/Modules selectmodule.c,2.39,2.40
- Next message: [Python-checkins] CVS: python/dist/src/Python atof.c,2.5,2.6 bltinmodule.c,2.170,2.171 ceval.c,2.185,2.186 codecs.c,2.10,2.11 compile.c,2.116,2.117 dup2.c,2.3,2.4 dynload_aix.c,2.6,2.7 errors.c,2.49,2.50 frozenmain.c,2.22,2.23 getargs.c,2.41,2.42 getcompiler.c,1.7,1.8 getcopyright.c,1.7,1.8 getcwd.c,1.12,1.13 getmtime.c,2.13,2.14 getopt.c,2.7,2.8 getplatform.c,1.6,1.7 getversion.c,1.12,1.13 hypot.c,2.1,2.2 import.c,2.141,2.142 importdl.c,2.66,2.67 marshal.c,1.52,1.53 memmove.c,2.6,2.7 modsupport.c,2.48,2.49 mystrtoul.c,2.19,2.20 pyfpe.c,2.5,2.6 pystate.c,2.11,2.12 pythonrun.c,2.104,2.105 sigcheck.c,2.6,2.7 strdup.c,2.3,2.4 strerror.c,2.8,2.9 strtod.c,1.9,1.10 structmember.c,2.16,2.17 sysmodule.c,2.69,2.70 thread.c,2.31,2.32 thread_cthread.h,2.11,2.12 thread_foobar.h,2.9,2.10 thread_lwp.h,2.11,2.12 thread_nt.h,2.14,2.15 thread_os2.h,2.8,2.9 thread_pth.h,2.4,2.5 thread_pthread.h,2.27,2.28 thread_sgi.h,2.12,2.13 thread_solaris.h,2.13,2.14 thread_wince.h,2.4,2.5 traceback.c,2.30,2.31
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Python
In directory slayer.i.sourceforge.net:/tmp/cvs-serv14831
Modified Files:
exceptions.c
Log Message:
Fix two instances of empty argument lists, and fix style
('PyObject** x' -> 'PyObject **x')
Index: exceptions.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** exceptions.c 2000/07/16 12:04:32 1.10
--- exceptions.c 2000/07/22 18:45:06 1.11
***************
*** 102,106 ****
/* Helper function for populating a dictionary with method wrappers. */
static int
! populate_methods(PyObject* klass, PyObject* dict, PyMethodDef* methods)
{
if (!methods)
--- 102,106 ----
/* Helper function for populating a dictionary with method wrappers. */
static int
! populate_methods(PyObject *klass, PyObject *dict, PyMethodDef *methods)
{
if (!methods)
***************
*** 109,114 ****
while (methods->ml_name) {
/* get a wrapper for the built-in function */
! PyObject* func = PyCFunction_New(methods, NULL);
! PyObject* meth;
int status;
--- 109,114 ----
while (methods->ml_name) {
/* get a wrapper for the built-in function */
! PyObject *func = PyCFunction_New(methods, NULL);
! PyObject *meth;
int status;
***************
*** 140,149 ****
/* This function is used to create all subsequent exception classes. */
static int
! make_class(PyObject** klass, PyObject* base,
! char* name, PyMethodDef* methods,
! char* docstr)
{
! PyObject* dict = PyDict_New();
! PyObject* str = NULL;
int status = -1;
--- 140,149 ----
/* This function is used to create all subsequent exception classes. */
static int
! make_class(PyObject **klass, PyObject *base,
! char *name, PyMethodDef *methods,
! char *docstr)
{
! PyObject *dict = PyDict_New();
! PyObject *str = NULL;
int status = -1;
***************
*** 180,186 ****
/* Use this for *args signatures, otherwise just use PyArg_ParseTuple() */
! static PyObject* get_self(PyObject* args)
{
! PyObject* self = PyTuple_GetItem(args, 0);
if (!self) {
/* Watch out for being called to early in the bootstrapping process */
--- 180,187 ----
/* Use this for *args signatures, otherwise just use PyArg_ParseTuple() */
! static PyObject *
! get_self(PyObject *args)
{
! PyObject *self = PyTuple_GetItem(args, 0);
if (!self) {
/* Watch out for being called to early in the bootstrapping process */
***************
*** 216,221 ****
! static PyObject*
! Exception__init__(PyObject* self, PyObject* args)
{
int status;
--- 217,222 ----
! static PyObject *
! Exception__init__(PyObject *self, PyObject *args)
{
int status;
***************
*** 239,246 ****
! static PyObject*
! Exception__str__(PyObject* self, PyObject* args)
{
! PyObject* out;
if (!PyArg_ParseTuple(args, "O", &self))
--- 240,247 ----
! static PyObject *
! Exception__str__(PyObject *self, PyObject *args)
{
! PyObject *out;
if (!PyArg_ParseTuple(args, "O", &self))
***************
*** 257,261 ****
case 1:
{
! PyObject* tmp = PySequence_GetItem(args, 0);
if (tmp) {
out = PyObject_Str(tmp);
--- 258,262 ----
case 1:
{
! PyObject *tmp = PySequence_GetItem(args, 0);
if (tmp) {
out = PyObject_Str(tmp);
***************
*** 276,284 ****
! static PyObject*
! Exception__getitem__(PyObject* self, PyObject* args)
{
! PyObject* out;
! PyObject* index;
if (!PyArg_ParseTuple(args, "OO", &self, &index))
--- 277,285 ----
! static PyObject *
! Exception__getitem__(PyObject *self, PyObject *args)
{
! PyObject *out;
! PyObject *index;
if (!PyArg_ParseTuple(args, "OO", &self, &index))
***************
*** 306,314 ****
static int
! make_Exception(char* modulename)
{
! PyObject* dict = PyDict_New();
! PyObject* str = NULL;
! PyObject* name = NULL;
int status = -1;
--- 307,315 ----
static int
! make_Exception(char *modulename)
{
! PyObject *dict = PyDict_New();
! PyObject *str = NULL;
! PyObject *name = NULL;
int status = -1;
***************
*** 366,373 ****
! static PyObject*
! SystemExit__init__(PyObject* self, PyObject* args)
{
! PyObject* code;
int status;
--- 367,374 ----
! static PyObject *
! SystemExit__init__(PyObject *self, PyObject *args)
{
! PyObject *code;
int status;
***************
*** 431,442 ****
! static PyObject*
! EnvironmentError__init__(PyObject* self, PyObject* args)
{
! PyObject* item0 = NULL;
! PyObject* item1 = NULL;
! PyObject* item2 = NULL;
! PyObject* subslice = NULL;
! PyObject* rtnval = NULL;
if (!(self = get_self(args)))
--- 432,443 ----
! static PyObject *
! EnvironmentError__init__(PyObject *self, PyObject *args)
{
! PyObject *item0 = NULL;
! PyObject *item1 = NULL;
! PyObject *item2 = NULL;
! PyObject *subslice = NULL;
! PyObject *rtnval = NULL;
if (!(self = get_self(args)))
***************
*** 515,526 ****
! static PyObject*
! EnvironmentError__str__(PyObject* self, PyObject* args)
{
! PyObject* originalself = self;
! PyObject* filename;
! PyObject* serrno;
! PyObject* strerror;
! PyObject* rtnval = NULL;
if (!PyArg_ParseTuple(args, "O", &self))
--- 516,527 ----
! static PyObject *
! EnvironmentError__str__(PyObject *self, PyObject *args)
{
! PyObject *originalself = self;
! PyObject *filename;
! PyObject *serrno;
! PyObject *strerror;
! PyObject *rtnval = NULL;
if (!PyArg_ParseTuple(args, "O", &self))
***************
*** 534,540 ****
if (filename != Py_None) {
! PyObject* fmt = PyString_FromString("[Errno %s] %s: %s");
! PyObject* repr = PyObject_Repr(filename);
! PyObject* tuple = PyTuple_New(3);
if (!fmt || !repr || !tuple) {
--- 535,541 ----
if (filename != Py_None) {
! PyObject *fmt = PyString_FromString("[Errno %s] %s: %s");
! PyObject *repr = PyObject_Repr(filename);
! PyObject *tuple = PyTuple_New(3);
if (!fmt || !repr || !tuple) {
***************
*** 558,563 ****
}
else if (PyObject_IsTrue(serrno) && PyObject_IsTrue(strerror)) {
! PyObject* fmt = PyString_FromString("[Errno %s] %s");
! PyObject* tuple = PyTuple_New(2);
if (!fmt || !tuple) {
--- 559,564 ----
}
else if (PyObject_IsTrue(serrno) && PyObject_IsTrue(strerror)) {
! PyObject *fmt = PyString_FromString("[Errno %s] %s");
! PyObject *tuple = PyTuple_New(2);
if (!fmt || !tuple) {
***************
*** 644,650 ****
static int
! SyntaxError__classinit__(PyObject* klass)
{
! PyObject* emptystring = PyString_FromString("");
/* Additional class-creation time initializations */
--- 645,651 ----
static int
! SyntaxError__classinit__(PyObject *klass)
{
! PyObject *emptystring = PyString_FromString("");
/* Additional class-creation time initializations */
***************
*** 664,671 ****
! static PyObject*
! SyntaxError__init__(PyObject* self, PyObject* args)
{
! PyObject* rtnval = NULL;
int lenargs;
--- 665,672 ----
! static PyObject *
! SyntaxError__init__(PyObject *self, PyObject *args)
{
! PyObject *rtnval = NULL;
int lenargs;
***************
*** 681,685 ****
lenargs = PySequence_Size(args);
if (lenargs >= 1) {
! PyObject* item0 = PySequence_GetItem(args, 0);
int status;
--- 682,686 ----
lenargs = PySequence_Size(args);
if (lenargs >= 1) {
! PyObject *item0 = PySequence_GetItem(args, 0);
int status;
***************
*** 692,696 ****
}
if (lenargs == 2) {
! PyObject* info = PySequence_GetItem(args, 1);
PyObject *filename, *lineno, *offset, *text;
int status = 1;
--- 693,697 ----
}
if (lenargs == 2) {
! PyObject *info = PySequence_GetItem(args, 1);
PyObject *filename, *lineno, *offset, *text;
int status = 1;
***************
*** 729,737 ****
! static PyObject*
! SyntaxError__str__(PyObject* self, PyObject* args)
{
! PyObject* msg;
! PyObject* str;
if (!PyArg_ParseTuple(args, "O", &self))
--- 730,738 ----
! static PyObject *
! SyntaxError__str__(PyObject *self, PyObject *args)
{
! PyObject *msg;
! PyObject *str;
if (!PyArg_ParseTuple(args, "O", &self))
***************
*** 855,869 ****
! /* mapping between exception names and their PyObject** */
! static struct
! {
! char* name;
! PyObject** exc;
! PyObject** base; /* NULL == PyExc_StandardError */
! char* docstr;
! PyMethodDef* methods;
! int (*classinit)(PyObject*);
! }
! exctable[] = {
/*
* The first three classes MUST appear in exactly this order
--- 856,868 ----
! /* mapping between exception names and their PyObject ** */
! static struct {
! char *name;
! PyObject **exc;
! PyObject **base; /* NULL == PyExc_StandardError */
! char *docstr;
! PyMethodDef *methods;
! int (*classinit)(PyObject *);
! } exctable[] = {
/*
* The first three classes MUST appear in exactly this order
***************
*** 929,944 ****
__declspec(dllexport)
#endif /* WIN32 */
! init_exceptions()
{
! char* modulename = "exceptions";
int modnamesz = strlen(modulename);
int i;
! PyObject* me = Py_InitModule(modulename, functions);
! PyObject* mydict = PyModule_GetDict(me);
! PyObject* bltinmod = PyImport_ImportModule("__builtin__");
! PyObject* bdict = PyModule_GetDict(bltinmod);
! PyObject* doc = PyString_FromString(module__doc__);
! PyObject* args;
PyDict_SetItemString(mydict, "__doc__", doc);
--- 928,943 ----
__declspec(dllexport)
#endif /* WIN32 */
! init_exceptions(void)
{
! char *modulename = "exceptions";
int modnamesz = strlen(modulename);
int i;
! PyObject *me = Py_InitModule(modulename, functions);
! PyObject *mydict = PyModule_GetDict(me);
! PyObject *bltinmod = PyImport_ImportModule("__builtin__");
! PyObject *bdict = PyModule_GetDict(bltinmod);
! PyObject *doc = PyString_FromString(module__doc__);
! PyObject *args;
PyDict_SetItemString(mydict, "__doc__", doc);
***************
*** 960,965 ****
for (i=1; exctable[i].name; i++) {
int status;
! char* cname = PyMem_NEW(char, modnamesz+strlen(exctable[i].name)+2);
! PyObject* base;
(void)strcpy(cname, modulename);
--- 959,964 ----
for (i=1; exctable[i].name; i++) {
int status;
! char *cname = PyMem_NEW(char, modnamesz+strlen(exctable[i].name)+2);
! PyObject *base;
(void)strcpy(cname, modulename);
***************
*** 1015,1019 ****
__declspec(dllexport)
#endif /* WIN32 */
! fini_exceptions()
{
int i;
--- 1014,1018 ----
__declspec(dllexport)
#endif /* WIN32 */
! fini_exceptions(void)
{
int i;
- Previous message: [Python-checkins] CVS: python/dist/src/Modules selectmodule.c,2.39,2.40
- Next message: [Python-checkins] CVS: python/dist/src/Python atof.c,2.5,2.6 bltinmodule.c,2.170,2.171 ceval.c,2.185,2.186 codecs.c,2.10,2.11 compile.c,2.116,2.117 dup2.c,2.3,2.4 dynload_aix.c,2.6,2.7 errors.c,2.49,2.50 frozenmain.c,2.22,2.23 getargs.c,2.41,2.42 getcompiler.c,1.7,1.8 getcopyright.c,1.7,1.8 getcwd.c,1.12,1.13 getmtime.c,2.13,2.14 getopt.c,2.7,2.8 getplatform.c,1.6,1.7 getversion.c,1.12,1.13 hypot.c,2.1,2.2 import.c,2.141,2.142 importdl.c,2.66,2.67 marshal.c,1.52,1.53 memmove.c,2.6,2.7 modsupport.c,2.48,2.49 mystrtoul.c,2.19,2.20 pyfpe.c,2.5,2.6 pystate.c,2.11,2.12 pythonrun.c,2.104,2.105 sigcheck.c,2.6,2.7 strdup.c,2.3,2.4 strerror.c,2.8,2.9 strtod.c,1.9,1.10 structmember.c,2.16,2.17 sysmodule.c,2.69,2.70 thread.c,2.31,2.32 thread_cthread.h,2.11,2.12 thread_foobar.h,2.9,2.10 thread_lwp.h,2.11,2.12 thread_nt.h,2.14,2.15 thread_os2.h,2.8,2.9 thread_pth.h,2.4,2.5 thread_pthread.h,2.27,2.28 thread_sgi.h,2.12,2.13 thread_solaris.h,2.13,2.14 thread_wince.h,2.4,2.5 traceback.c,2.30,2.31
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]