[Python-checkins] CVS: python/dist/src/Python sysmodule.c,2.63,2.64

Marc-Andre Lemburg python-dev@python.org
Wed, 7 Jun 2000 02:13:44 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory slayer.i.sourceforge.net:/tmp/cvs-serv18159/Python

Modified Files:
	sysmodule.c 
Log Message:
Marc-Andre Lemburg <mal@lemburg.com>:
Changed the API names for setting the default encoding.
These are now in line with the other hooks API names
(no underscores).

Index: sysmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v
retrieving revision 2.63
retrieving revision 2.64
diff -C2 -r2.63 -r2.64
*** sysmodule.c	2000/05/09 19:57:01	2.63
--- sysmodule.c	2000/06/07 09:13:41	2.64
***************
*** 144,158 ****
  
  static PyObject *
! sys_get_string_encoding(self, args)
  	PyObject *self;
  	PyObject *args;
  {
! 	if (!PyArg_ParseTuple(args, ":get_string_encoding"))
  		return NULL;
  	return PyString_FromString(PyUnicode_GetDefaultEncoding());
  }
  
! static char get_string_encoding_doc[] =
! "get_string_encoding() -> string\n\
  \n\
  Return the current default string encoding used by the Unicode \n\
--- 144,158 ----
  
  static PyObject *
! sys_getdefaultencoding(self, args)
  	PyObject *self;
  	PyObject *args;
  {
! 	if (!PyArg_ParseTuple(args, ":getdefaultencoding"))
  		return NULL;
  	return PyString_FromString(PyUnicode_GetDefaultEncoding());
  }
  
! static char getdefaultencoding_doc[] =
! "getdefaultencoding() -> string\n\
  \n\
  Return the current default string encoding used by the Unicode \n\
***************
*** 160,169 ****
  
  static PyObject *
! sys_set_string_encoding(self, args)
  	PyObject *self;
  	PyObject *args;
  {
  	char *encoding;
! 	if (!PyArg_ParseTuple(args, "s:set_string_encoding", &encoding))
  		return NULL;
  	if (PyUnicode_SetDefaultEncoding(encoding))
--- 160,169 ----
  
  static PyObject *
! sys_setdefaultencoding(self, args)
  	PyObject *self;
  	PyObject *args;
  {
  	char *encoding;
! 	if (!PyArg_ParseTuple(args, "s:setdefaultencoding", &encoding))
  		return NULL;
  	if (PyUnicode_SetDefaultEncoding(encoding))
***************
*** 173,178 ****
  }
  
! static char set_string_encoding_doc[] =
! "set_string_encoding(encoding)\n\
  \n\
  Set the current default string encoding used by the Unicode implementation.";
--- 173,178 ----
  }
  
! static char setdefaultencoding_doc[] =
! "setdefaultencoding(encoding)\n\
  \n\
  Set the current default string encoding used by the Unicode implementation.";
***************
*** 302,306 ****
  	{"exc_info",	sys_exc_info, 1, exc_info_doc},
  	{"exit",	sys_exit, 0, exit_doc},
! 	{"get_string_encoding", sys_get_string_encoding, 1, get_string_encoding_doc},
  #ifdef COUNT_ALLOCS
  	{"getcounts",	sys_getcounts, 1},
--- 302,306 ----
  	{"exc_info",	sys_exc_info, 1, exc_info_doc},
  	{"exit",	sys_exit, 0, exit_doc},
! 	{"getdefaultencoding", sys_getdefaultencoding, 1, getdefaultencoding_doc},
  #ifdef COUNT_ALLOCS
  	{"getcounts",	sys_getcounts, 1},
***************
*** 316,320 ****
  	{"mdebug",	sys_mdebug, 1},
  #endif
! 	{"set_string_encoding", sys_set_string_encoding, 1, set_string_encoding_doc},
  	{"setcheckinterval",	sys_setcheckinterval, 1, setcheckinterval_doc},
  	{"setprofile",	sys_setprofile, 0, setprofile_doc},
--- 316,320 ----
  	{"mdebug",	sys_mdebug, 1},
  #endif
! 	{"setdefaultencoding", sys_setdefaultencoding, 1, setdefaultencoding_doc},
  	{"setcheckinterval",	sys_setcheckinterval, 1, setcheckinterval_doc},
  	{"setprofile",	sys_setprofile, 0, setprofile_doc},