[Python-checkins] python/dist/src/Python sysmodule.c,2.103,2.104

loewis@users.sourceforge.net loewis@users.sourceforge.net
Sun, 09 Jun 2002 06:33:56 -0700


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

Modified Files:
	sysmodule.c 
Log Message:
Patch #505375: Make doc strings optional.


Index: sysmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v
retrieving revision 2.103
retrieving revision 2.104
diff -C2 -d -r2.103 -r2.104
*** sysmodule.c	27 Mar 2002 13:03:09 -0000	2.103
--- sysmodule.c	9 Jun 2002 13:33:54 -0000	2.104
***************
*** 104,111 ****
  }
  
! static char displayhook_doc[] =
  "displayhook(object) -> None\n"
  "\n"
! "Print an object to sys.stdout and also save it in __builtin__._\n";
  
  static PyObject *
--- 104,112 ----
  }
  
! PyDoc_STRVAR(displayhook_doc,
  "displayhook(object) -> None\n"
  "\n"
! "Print an object to sys.stdout and also save it in __builtin__._\n"
! );
  
  static PyObject *
***************
*** 120,127 ****
  }
  
! static char excepthook_doc[] =
  "excepthook(exctype, value, traceback) -> None\n"
  "\n"
! "Handle an exception by displaying it with a traceback on sys.stderr.\n";
  
  static PyObject *
--- 121,129 ----
  }
  
! PyDoc_STRVAR(excepthook_doc,
  "excepthook(exctype, value, traceback) -> None\n"
  "\n"
! "Handle an exception by displaying it with a traceback on sys.stderr.\n"
! );
  
  static PyObject *
***************
*** 138,146 ****
  }
  
! static char exc_info_doc[] =
  "exc_info() -> (type, value, traceback)\n\
  \n\
  Return information about the exception that is currently being handled.\n\
! This should be called from inside an except clause only.";
  
  static PyObject *
--- 140,149 ----
  }
  
! PyDoc_STRVAR(exc_info_doc,
  "exc_info() -> (type, value, traceback)\n\
  \n\
  Return information about the exception that is currently being handled.\n\
! This should be called from inside an except clause only."
! );
  
  static PyObject *
***************
*** 155,159 ****
  }
  
! static char exit_doc[] =
  "exit([status])\n\
  \n\
--- 158,162 ----
  }
  
! PyDoc_STRVAR(exit_doc,
  "exit([status])\n\
  \n\
***************
*** 162,166 ****
  If the status is numeric, it will be used as the system exit status.\n\
  If it is another kind of object, it will be printed and the system\n\
! exit status will be one (i.e., failure).";
  
  #ifdef Py_USING_UNICODE
--- 165,170 ----
  If the status is numeric, it will be used as the system exit status.\n\
  If it is another kind of object, it will be printed and the system\n\
! exit status will be one (i.e., failure)."
! );
  
  #ifdef Py_USING_UNICODE
***************
*** 172,180 ****
  }
  
! static char getdefaultencoding_doc[] =
  "getdefaultencoding() -> string\n\
  \n\
  Return the current default string encoding used by the Unicode \n\
! implementation.";
  
  static PyObject *
--- 176,185 ----
  }
  
! PyDoc_STRVAR(getdefaultencoding_doc,
  "getdefaultencoding() -> string\n\
  \n\
  Return the current default string encoding used by the Unicode \n\
! implementation."
! );
  
  static PyObject *
***************
*** 190,197 ****
  }
  
! static char setdefaultencoding_doc[] =
  "setdefaultencoding(encoding)\n\
  \n\
! Set the current default string encoding used by the Unicode implementation.";
  
  #endif
--- 195,203 ----
  }
  
! PyDoc_STRVAR(setdefaultencoding_doc,
  "setdefaultencoding(encoding)\n\
  \n\
! Set the current default string encoding used by the Unicode implementation."
! );
  
  #endif
***************
*** 317,325 ****
  }
  
! static char settrace_doc[] =
  "settrace(function)\n\
  \n\
  Set the global debug tracing function.  It will be called on each\n\
! function call.  See the debugger chapter in the library manual.";
  
  static PyObject *
--- 323,332 ----
  }
  
! PyDoc_STRVAR(settrace_doc,
  "settrace(function)\n\
  \n\
  Set the global debug tracing function.  It will be called on each\n\
! function call.  See the debugger chapter in the library manual."
! );
  
  static PyObject *
***************
*** 336,344 ****
  }
  
! static char setprofile_doc[] =
  "setprofile(function)\n\
  \n\
  Set the profiling function.  It will be called on each function call\n\
! and return.  See the profiler chapter in the library manual.";
  
  static PyObject *
--- 343,352 ----
  }
  
! PyDoc_STRVAR(setprofile_doc,
  "setprofile(function)\n\
  \n\
  Set the profiling function.  It will be called on each function call\n\
! and return.  See the profiler chapter in the library manual."
! );
  
  static PyObject *
***************
*** 352,360 ****
  }
  
! static char setcheckinterval_doc[] =
  "setcheckinterval(n)\n\
  \n\
  Tell the Python interpreter to check for asynchronous events every\n\
! n instructions.  This also affects how often thread switches occur.";
  
  static PyObject *
--- 360,369 ----
  }
  
! PyDoc_STRVAR(setcheckinterval_doc,
  "setcheckinterval(n)\n\
  \n\
  Tell the Python interpreter to check for asynchronous events every\n\
! n instructions.  This also affects how often thread switches occur."
! );
  
  static PyObject *
***************
*** 374,378 ****
  }
  
! static char setrecursionlimit_doc[] =
  "setrecursionlimit(n)\n\
  \n\
--- 383,387 ----
  }
  
! PyDoc_STRVAR(setrecursionlimit_doc,
  "setrecursionlimit(n)\n\
  \n\
***************
*** 380,384 ****
  limit prevents infinite recursion from causing an overflow of the C\n\
  stack and crashing Python.  The highest possible limit is platform-\n\
! dependent.";
  
  static PyObject *
--- 389,394 ----
  limit prevents infinite recursion from causing an overflow of the C\n\
  stack and crashing Python.  The highest possible limit is platform-\n\
! dependent."
! );
  
  static PyObject *
***************
*** 388,392 ****
  }
  
! static char getrecursionlimit_doc[] =
  "getrecursionlimit()\n\
  \n\
--- 398,402 ----
  }
  
! PyDoc_STRVAR(getrecursionlimit_doc,
  "getrecursionlimit()\n\
  \n\
***************
*** 394,397 ****
--- 404,408 ----
  of the Python interpreter stack.  This limit prevents infinite\n\
  recursion from causing an overflow of the C stack and crashing Python.";
+ );
  
  #ifdef HAVE_DLOPEN
***************
*** 410,414 ****
  }
  
! static char setdlopenflags_doc[] =
  "setdlopenflags(n) -> None\n\
  \n\
--- 421,425 ----
  }
  
! PyDoc_STRVAR(setdlopenflags_doc,
  "setdlopenflags(n) -> None\n\
  \n\
***************
*** 417,421 ****
  a module, if called as sys.setdlopenflags(0)\n\
  To share symbols across extension modules, call as\n\
! sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)";
  
  static PyObject *
--- 428,433 ----
  a module, if called as sys.setdlopenflags(0)\n\
  To share symbols across extension modules, call as\n\
! sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)"
! );
  
  static PyObject *
***************
*** 428,436 ****
  }
  
! static char getdlopenflags_doc[] =
  "getdlopenflags() -> int\n\
  \n\
  Return the current value of the flags that are used for dlopen()\n\
! calls. The flag constants are defined in the dl module.";
  #endif
  
--- 440,449 ----
  }
  
! PyDoc_STRVAR(getdlopenflags_doc,
  "getdlopenflags() -> int\n\
  \n\
  Return the current value of the flags that are used for dlopen()\n\
! calls. The flag constants are defined in the dl module."
! );
  #endif
  
***************
*** 467,475 ****
  #endif /* Py_TRACE_REFS */
  
! static char getrefcount_doc[] =
  "getrefcount(object) -> integer\n\
  \n\
  Return the current reference count for the object.  This includes the\n\
! temporary reference in the argument list, so it is at least 2.";
  
  #ifdef COUNT_ALLOCS
--- 480,489 ----
  #endif /* Py_TRACE_REFS */
  
! PyDoc_STRVAR(getrefcount_doc,
  "getrefcount(object) -> integer\n\
  \n\
  Return the current reference count for the object.  This includes the\n\
! temporary reference in the argument list, so it is at least 2."
! );
  
  #ifdef COUNT_ALLOCS
***************
*** 483,487 ****
  #endif
  
! static char getframe_doc[] =
  "_getframe([depth]) -> frameobject\n\
  \n\
--- 497,501 ----
  #endif
  
! PyDoc_STRVAR(getframe_doc,
  "_getframe([depth]) -> frameobject\n\
  \n\
***************
*** 492,496 ****
  \n\
  This function should be used for internal and specialized\n\
! purposes only.";
  
  static PyObject *
--- 506,511 ----
  \n\
  This function should be used for internal and specialized\n\
! purposes only."
! );
  
  static PyObject *
***************
*** 634,638 ****
     or other abomination that however *does* understand longer strings,
     get rid of the !!! comment in the middle and the quotes that surround it. */
! static char sys_doc[] =
  "This module provides access to some objects used or maintained by the\n\
  interpreter and to functions that interact strongly with the interpreter.\n\
--- 649,654 ----
     or other abomination that however *does* understand longer strings,
     get rid of the !!! comment in the middle and the quotes that surround it. */
! PyDoc_VAR(sys_doc) =
! PyDoc_STR(
  "This module provides access to some objects used or maintained by the\n\
  interpreter and to functions that interact strongly with the interpreter.\n\
***************
*** 670,675 ****
--- 686,693 ----
    because it is thread-safe.\n\
  "
+ )
  #ifndef MS_WIN16
  /* concatenating string here */
+ PyDoc_STR(
  "\n\
  Static objects:\n\
***************
*** 687,696 ****
--- 705,718 ----
  exec_prefix -- prefix used to find the machine-specific Python library\n\
  "
+ )
  #ifdef MS_WINDOWS
  /* concatenating string here */
+ PyDoc_STR(
  "dllhandle -- [Windows only] integer handle of the Python DLL\n\
  winver -- [Windows only] version number of the Python DLL\n\
  "
+ )
  #endif /* MS_WINDOWS */
+ PyDoc_STR(
  "__stdin__ -- the original stdin; don't touch!\n\
  __stdout__ -- the original stdout; don't touch!\n\
***************
*** 714,717 ****
--- 736,740 ----
  settrace() -- set the global debug tracing function\n\
  "
+ )
  #endif /* MS_WIN16 */
  /* end of sys_doc */ ;