[Python-checkins] CVS: python/dist/src/Modules _sre.c,2.77,2.78 _tkinter.c,1.123,1.124 cPickle.c,2.75,2.76

Neal Norwitz nnorwitz@users.sourceforge.net
Sun, 31 Mar 2002 06:44:25 -0800


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv12872

Modified Files:
	_sre.c _tkinter.c cPickle.c 
Log Message:
Use symbolic METH_VARARGS/METH_OLDARGS instead of 1/0 for ml_flags

Index: _sre.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v
retrieving revision 2.77
retrieving revision 2.78
diff -C2 -d -r2.77 -r2.78
*** _sre.c	9 Dec 2001 16:13:15 -0000	2.77
--- _sre.c	31 Mar 2002 14:44:22 -0000	2.78
***************
*** 2939,2944 ****
  
  static PyMethodDef scanner_methods[] = {
!     {"match", (PyCFunction) scanner_match, 0},
!     {"search", (PyCFunction) scanner_search, 0},
      {NULL, NULL}
  };
--- 2939,2944 ----
  
  static PyMethodDef scanner_methods[] = {
!     {"match", (PyCFunction) scanner_match, METH_OLDARGS},
!     {"search", (PyCFunction) scanner_search, METH_OLDARGS},
      {NULL, NULL}
  };
***************
*** 2975,2981 ****
  
  static PyMethodDef _functions[] = {
!     {"compile", _compile, 1},
!     {"getcodesize", sre_codesize, 1},
!     {"getlower", sre_getlower, 1},
      {NULL, NULL}
  };
--- 2975,2981 ----
  
  static PyMethodDef _functions[] = {
!     {"compile", _compile, METH_VARARGS},
!     {"getcodesize", sre_codesize, METH_VARARGS},
!     {"getlower", sre_getlower, METH_VARARGS},
      {NULL, NULL}
  };

Index: _tkinter.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v
retrieving revision 1.123
retrieving revision 1.124
diff -C2 -d -r1.123 -r1.124
*** _tkinter.c	26 Jan 2002 20:21:50 -0000	1.123
--- _tkinter.c	31 Mar 2002 14:44:22 -0000	1.124
***************
*** 1547,1551 ****
  static PyMethodDef Tktt_methods[] =
  {
! 	{"deletetimerhandler", Tktt_DeleteTimerHandler, 1},
  	{NULL, NULL}
  };
--- 1547,1551 ----
  static PyMethodDef Tktt_methods[] =
  {
! 	{"deletetimerhandler", Tktt_DeleteTimerHandler, METH_VARARGS},
  	{NULL, NULL}
  };

Index: cPickle.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v
retrieving revision 2.75
retrieving revision 2.76
diff -C2 -d -r2.75 -r2.76
*** cPickle.c	22 Mar 2002 23:02:53 -0000	2.75
--- cPickle.c	31 Mar 2002 14:44:22 -0000	2.76
***************
*** 2260,2270 ****
  
  static struct PyMethodDef Pickler_methods[] = {
!   {"dump",          (PyCFunction)Pickler_dump,  1,
     "dump(object) --"
     "Write an object in pickle format to the object's pickle stream\n"
    },
!   {"clear_memo",  (PyCFunction)Pickle_clear_memo,  1,
     "clear_memo() -- Clear the picklers memo"},
!   {"getvalue",  (PyCFunction)Pickle_getvalue,  1,
     "getvalue() -- Finish picking a list-based pickle"},
    {NULL,                NULL}           /* sentinel */
--- 2260,2270 ----
  
  static struct PyMethodDef Pickler_methods[] = {
!   {"dump",          (PyCFunction)Pickler_dump,  METH_VARARGS,
     "dump(object) --"
     "Write an object in pickle format to the object's pickle stream\n"
    },
!   {"clear_memo",  (PyCFunction)Pickle_clear_memo,  METH_VARARGS,
     "clear_memo() -- Clear the picklers memo"},
!   {"getvalue",  (PyCFunction)Pickle_getvalue,  METH_VARARGS,
     "getvalue() -- Finish picking a list-based pickle"},
    {NULL,                NULL}           /* sentinel */
***************
*** 4180,4187 ****
  
  static struct PyMethodDef Unpickler_methods[] = {
!   {"load",         (PyCFunction)Unpickler_load,   1,
     "load() -- Load a pickle"
    },
!   {"noload",         (PyCFunction)Unpickler_noload,   1,
     "noload() -- not load a pickle, but go through most of the motions\n"
     "\n"
--- 4180,4187 ----
  
  static struct PyMethodDef Unpickler_methods[] = {
!   {"load",         (PyCFunction)Unpickler_load,   METH_VARARGS,
     "load() -- Load a pickle"
    },
!   {"noload",         (PyCFunction)Unpickler_noload,   METH_VARARGS,
     "noload() -- not load a pickle, but go through most of the motions\n"
     "\n"
***************
*** 4514,4518 ****
  
  static struct PyMethodDef cPickle_methods[] = {
!   {"dump",         (PyCFunction)cpm_dump,         1,
     "dump(object, file, [binary]) --"
     "Write an object in pickle format to the given file\n"
--- 4514,4518 ----
  
  static struct PyMethodDef cPickle_methods[] = {
!   {"dump",         (PyCFunction)cpm_dump,         METH_VARARGS,
     "dump(object, file, [binary]) --"
     "Write an object in pickle format to the given file\n"
***************
*** 4522,4526 ****
     "computationally efficient. \n"
    },
!   {"dumps",        (PyCFunction)cpm_dumps,        1,
     "dumps(object, [binary]) --"
     "Return a string containing an object in pickle format\n"
--- 4522,4526 ----
     "computationally efficient. \n"
    },
!   {"dumps",        (PyCFunction)cpm_dumps,        METH_VARARGS,
     "dumps(object, [binary]) --"
     "Return a string containing an object in pickle format\n"
***************
*** 4530,4538 ****
     "computationally efficient. \n"
    },
!   {"load",         (PyCFunction)cpm_load,         1,
     "load(file) -- Load a pickle from the given file"},
!   {"loads",        (PyCFunction)cpm_loads,        1,
     "loads(string) -- Load a pickle from the given string"},
!   {"Pickler",      (PyCFunction)get_Pickler,      1,
     "Pickler(file, [binary]) -- Create a pickler\n"
     "\n"
--- 4530,4538 ----
     "computationally efficient. \n"
    },
!   {"load",         (PyCFunction)cpm_load,         METH_VARARGS,
     "load(file) -- Load a pickle from the given file"},
!   {"loads",        (PyCFunction)cpm_loads,        METH_VARARGS,
     "loads(string) -- Load a pickle from the given string"},
!   {"Pickler",      (PyCFunction)get_Pickler,      METH_VARARGS,
     "Pickler(file, [binary]) -- Create a pickler\n"
     "\n"
***************
*** 4541,4545 ****
     "computationally efficient. \n"
    },
!   {"Unpickler",    (PyCFunction)get_Unpickler,    1,
     "Unpickler(file) -- Create an unpickler"},
    { NULL, NULL }
--- 4541,4545 ----
     "computationally efficient. \n"
    },
!   {"Unpickler",    (PyCFunction)get_Unpickler,    METH_VARARGS,
     "Unpickler(file) -- Create an unpickler"},
    { NULL, NULL }