1. 01 Mar, 2006 1 commit
  2. 16 Feb, 2006 1 commit
  3. 15 Feb, 2006 1 commit
  4. 24 Dec, 2005 1 commit
  5. 10 Dec, 2005 1 commit
    • Jeremy Hylton's avatar
      Add const to several API functions that take char *. · af68c874
      Jeremy Hylton authored
      In C++, it's an error to pass a string literal to a char* function
      without a const_cast().  Rather than require every C++ extension
      module to put a cast around string literals, fix the API to state the
      const-ness.
      
      I focused on parts of the API where people usually pass literals:
      PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type
      slots, etc.  Predictably, there were a large set of functions that
      needed to be fixed as a result of these changes.  The most pervasive
      change was to make the keyword args list passed to
      PyArg_ParseTupleAndKewords() to be a const char *kwlist[].
      
      One cast was required as a result of the changes:  A type object
      mallocs the memory for its tp_doc slot and later frees it.
      PyTypeObject says that tp_doc is const char *; but if the type was
      created by type_new(), we know it is safe to cast to char *.
      af68c874
  6. 24 Nov, 2005 1 commit
  7. 20 Nov, 2005 1 commit
  8. 14 Jul, 2004 1 commit
    • Michael W. Hudson's avatar
      This is Pete Shinners' patch from his bug report · c849e63e
      Michael W. Hudson authored
      [ 984722 ] Py_BuildValue loses reference counts on error
      
      I'm ever-so-slightly uneasy at the amount of work this can do with an
      exception pending, but I don't think that this can result in anything
      more serious than a strange error message.
      c849e63e
  9. 19 Nov, 2003 1 commit
  10. 24 Oct, 2003 1 commit
  11. 21 Jun, 2003 1 commit
  12. 17 Apr, 2003 1 commit
  13. 29 Mar, 2003 1 commit
  14. 31 Jan, 2003 1 commit
    • Jeremy Hylton's avatar
      Provide __module__ attributes for functions defined in C and Python. · 4f0dcc9a
      Jeremy Hylton authored
      __module__ is the string name of the module the function was defined
      in, just like __module__ of classes.  In some cases, particularly for
      C functions, the __module__ may be None.
      
      Change PyCFunction_New() from a function to a macro, but keep an
      unused copy of the function around so that we don't change the binary
      API.
      
      Change pickle's save_global() to use whichmodule() if __module__ is
      None, but add the __module__ logic to whichmodule() since it might be
      used outside of pickle.
      4f0dcc9a
  15. 30 Jan, 2003 1 commit
  16. 15 Dec, 2002 1 commit
  17. 14 Aug, 2002 1 commit
  18. 28 Jul, 2002 1 commit
  19. 17 Jun, 2002 1 commit
  20. 28 Mar, 2002 1 commit
    • Fred Drake's avatar
      Introduce two new flag bits that can be set in a PyMethodDef method · 7bf9715a
      Fred Drake authored
      descriptor, as used for the tp_methods slot of a type.  These new flag
      bits are both optional, and mutually exclusive.  Most methods will not
      use either.  These flags are used to create special method types which
      exist in the same namespace as normal methods without having to use
      tedious construction code to insert the new special method objects in
      the type's tp_dict after PyType_Ready() has been called.
      
      If METH_CLASS is specified, the method will represent a class method
      like that returned by the classmethod() built-in.
      
      If METH_STATIC is specified, the method will represent a static method
      like that returned by the staticmethod() built-in.
      
      These flags may not be used in the PyMethodDef table for modules since
      these special method types are not meaningful in that case; a
      ValueError will be raised if these flags are found in that context.
      7bf9715a
  21. 17 Aug, 2001 1 commit
    • Martin v. Löwis's avatar
      Patch #445762: Support --disable-unicode · 339d0f72
      Martin v. Löwis authored
      - Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled
      - check for Py_USING_UNICODE in all places that use Unicode functions
      - disables unicode literals, and the builtin functions
      - add the types.StringTypes list
      - remove Unicode literals from most tests.
      339d0f72
  22. 04 Aug, 2001 1 commit
  23. 31 Jul, 2001 1 commit
    • Marc-André Lemburg's avatar
      This patch turns the Python API mismatch notice into a standard · e5006ebc
      Marc-André Lemburg authored
      Python warning which can be catched by means of the Python warning
      framework.
      
      It also adds two new APIs which hopefully make it easier for Python
      to switch to buffer overflow safe [v]snprintf() APIs for error
      reporting et al. The two new APIs are PyOS_snprintf() and
      PyOS_vsnprintf() and work just like the standard ones in many
      C libs. On platforms which have snprintf(), the native APIs are used,
      on all other an emulation with snprintf() tries to do its best.
      e5006ebc
  24. 12 Mar, 2001 1 commit
  25. 26 Sep, 2000 1 commit
  26. 23 Sep, 2000 1 commit
    • Fred Drake's avatar
      Andrew Kuchling <akuchlin@mems-exchange.org>: · 9e285156
      Fred Drake authored
      Add three new convenience functions to the PyModule_*() family:
      PyModule_AddObject(), PyModule_AddIntConstant(), PyModule_AddStringConstant().
      
      This closes SourceForge patch #101233.
      9e285156
  27. 15 Sep, 2000 1 commit
  28. 01 Sep, 2000 1 commit
  29. 04 Aug, 2000 1 commit
  30. 22 Jul, 2000 1 commit
  31. 09 Jul, 2000 1 commit
  32. 06 Jul, 2000 1 commit
  33. 03 Jul, 2000 1 commit
  34. 30 Jun, 2000 2 commits
  35. 28 Jun, 2000 1 commit
  36. 28 Apr, 2000 1 commit
    • Fred Drake's avatar
      Brian Hooper <brian_takashi@hotmail.com>: · 25d34473
      Fred Drake authored
      Here's a patch which changes modsupport to add 'u' and 'u#',
      to support building Unicode objects from a null-terminated
      Py_UNICODE *, and a Py_UNICODE * with length, respectively.
      
      [Conversion from 'U' to 'u' by Fred, based on python-dev comments.]
      
      Note that the use of None for NULL values of the Py_UNICODE* value is
      still in; I'm not sure of the conclusion on that issue.
      25d34473
  37. 25 Jan, 1999 1 commit
  38. 23 Dec, 1998 2 commits