[Python-checkins] python/dist/src/Modules _tkinter.c,1.142,1.143

loewis@users.sourceforge.net loewis@users.sourceforge.net
Fri, 03 Jan 2003 16:33:15 -0800


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

Modified Files:
	_tkinter.c 
Log Message:
Wrap doc strings in PyDoc_STRVAR. Fix .string docstring. Provide default
macro definitions for older Python releases.


Index: _tkinter.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v
retrieving revision 1.142
retrieving revision 1.143
diff -C2 -d -r1.142 -r1.143
*** _tkinter.c	4 Jan 2003 00:08:08 -0000	1.142
--- _tkinter.c	4 Jan 2003 00:33:13 -0000	1.143
***************
*** 38,41 ****
--- 38,50 ----
  #endif
  
+ /* Allow using this code in Python 2.[12] */
+ #ifndef PyDoc_STRVAR
+ #define PyDoc_STRVAR(name,str) static char name[] = PyDoc_STR(str)
+ #endif
+ 
+ #ifndef PyMODINIT_FUNC
+ #define PyPyMODINIT_FUNC void
+ #endif
+ 
  /* Starting with Tcl 8.4, many APIs offer const-correctness.  Unfortunately,
     making _tkinter correct for this API means to break earlier
***************
*** 724,727 ****
--- 733,739 ----
  
  /* Like _str, but create Unicode if necessary. */
+ PyDoc_STRVAR(PyTclObject_string__doc__, 
+ "the string representation of this object, either as string or Unicode");
+ 
  static PyObject *
  PyTclObject_string(PyTclObject *self, void *ignored)
***************
*** 756,759 ****
--- 768,773 ----
  
  #ifdef Py_USING_UNICODE
+ PyDoc_STRVAR(PyTclObject_unicode__doc__, "convert argument to unicode");
+ 
  static PyObject *
  PyTclObject_unicode(PyTclObject *self, void *ignored)
***************
*** 780,783 ****
--- 794,799 ----
  }
  
+ PyDoc_STRVAR(get_typename__doc__, "name of the Tcl type");
+ 
  static PyObject*
  get_typename(PyTclObject* obj, void* ignored)
***************
*** 786,792 ****
  }
  
  static PyGetSetDef PyTclObject_getsetlist[] = {
! 	{"typename", (getter)get_typename, NULL, "name of the Tcl type"},
! 	{"string", (getter)PyTclObject_string, NULL, "name of the Tcl type"},
  	{0},
  };
--- 802,810 ----
  }
  
+ 
  static PyGetSetDef PyTclObject_getsetlist[] = {
! 	{"typename", (getter)get_typename, NULL, get_typename__doc__},
! 	{"string", (getter)PyTclObject_string, NULL, 
! 	 PyTclObject_string__doc__},
  	{0},
  };
***************
*** 794,798 ****
  static PyMethodDef PyTclObject_methods[] = {
  	{"__unicode__",	(PyCFunction)PyTclObject_unicode, METH_NOARGS,
! 	 "convert argument to unicode"},
  	{0}
  };
--- 812,816 ----
  static PyMethodDef PyTclObject_methods[] = {
  	{"__unicode__",	(PyCFunction)PyTclObject_unicode, METH_NOARGS,
! 	PyTclObject_unicode__doc__},
  	{0}
  };