1. 22 Nov, 2018 7 commits
    • Victor Stinner's avatar
      bpo-18407: win32_urandom() uses PY_DWORD_MAX (GH-10656) · c48ff73d
      Victor Stinner authored
      CryptGenRandom() maximum size is PY_DWORD_MAX, not INT_MAX.
      Use DWORD type for the 'chunk' variable
      Co-Authored-By: default avatarJeremy Kloth <jeremy.kloth@gmail.com>
      c48ff73d
    • Victor Stinner's avatar
      bpo-9566: Fix compiler warnings in pyexpat.c (GH-10654) · 28f468cb
      Victor Stinner authored
      Explicit cast a pointer difference (intptr_t) to int to fix
      two warnings on 64-bit Windows:
      
          Modules\pyexpat.c(1181): warning C4244: 'initializing':
          conversion from '__int64' to 'int', possible  loss of data
      
          Modules\pyexpat.c(1192): warning C4244: 'initializing':
          conversion from '__int64' to 'int', possible  loss of data
      28f468cb
    • Victor Stinner's avatar
      cjkcodecs: Fix compiler warning (GH-10651) · cdbcb773
      Victor Stinner authored
      Fixed the following compiler warning in multibytecodec.c:
      
          warning C4244: '=': conversion from 'Py_ssize_t'
          to 'unsigned char', possible loss of data
      
      Cast Py_ssize_t to unsigned char: the maximum value is checked
      on the previous line.
      cdbcb773
    • Victor Stinner's avatar
      bpo-35059: Cast void* to PyObject* (GH-10650) · a42de742
      Victor Stinner authored
      Don't pass void* to Python macros: use _PyObject_CAST().
      a42de742
    • Victor Stinner's avatar
      bpo-35059: Cleanup usage of Python macros (GH-10648) · b37672da
      Victor Stinner authored
      Don't pass complex expressions but regular variables to Python
      macros.
      
      * _datetimemodule.c: split single large "if" into two "if"
        in date_new(), time_new() and datetime_new().
      * _pickle.c, load_extension(): flatten complex "if" expression into
        more regular C code.
      * _ssl.c: addbool() now uses a temporary bool_obj to only evaluate
        the value once.
      * weakrefobject.c: replace "Py_INCREF(result = proxy);"
        with "result = proxy; Py_INCREF(result);"
      b37672da
    • Victor Stinner's avatar
      bpo-35059: Add _PyObject_CAST() macro (GH-10645) · 2ff8fb76
      Victor Stinner authored
      Add _PyObject_CAST() and _PyVarObject_CAST() macros to cast argument
      to PyObject* and PyVarObject* properly.
      2ff8fb76
    • Victor Stinner's avatar
      bpo-35059: Convert _PyObject_GC_TRACK() to inline function (GH-10643) · 271753a2
      Victor Stinner authored
      * Add _PyObject_ASSERT_FROM() and _PyObject_ASSERT_FAILED_MSG()
        macros.
      * PyObject_GC_Track() now calls _PyObject_ASSERT_FAILED_MSG(),
        instead of Py_FatalError(), if the object is already tracked, to
        dump more information on error.
      * _PyObject_GC_TRACK() no longer checks if the object is already
        tracked at runtime, use an assertion instead for best performances;
        PyObject_GC_Track() still checks at runtime.
      * pycore_object.h now includes pycore_pystate.h.
      * Convert _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() macros to
        inline functions.
      271753a2
  2. 21 Nov, 2018 6 commits
  3. 20 Nov, 2018 9 commits
  4. 19 Nov, 2018 1 commit
  5. 18 Nov, 2018 2 commits
  6. 17 Nov, 2018 3 commits
  7. 16 Nov, 2018 7 commits
  8. 15 Nov, 2018 4 commits
  9. 14 Nov, 2018 1 commit