DEVTOOLSSUPPORT-52386.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. commit 3bb34c7656f9f425d9f9dbe140340f1d5b57586f
  2. merge: 78a88b4da152acc232b549f8a7415d3f8a67bd31 b694ac6e026f3dd205118ad0f939efc45e985a69
  3. author: pg
  4. date: 2024-10-11T10:22:30+03:00
  5. revision: 15073732
  6. DEVTOOLSSUPPORT-52386
  7. REVIEW: 6974995
  8. --- contrib/tools/cython/Cython/Utility/ImportExport.c (78a88b4da152acc232b549f8a7415d3f8a67bd31)
  9. +++ contrib/tools/cython/Cython/Utility/ImportExport.c (3bb34c7656f9f425d9f9dbe140340f1d5b57586f)
  10. @@ -331,7 +331,7 @@ static PyTypeObject *__Pyx_ImportType_$cyversion(PyObject *module, const char *m
  11. size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_$cyversion check_size)
  12. {
  13. PyObject *result = 0;
  14. - char warning[200];
  15. + //char warning[200];
  16. Py_ssize_t basicsize;
  17. Py_ssize_t itemsize;
  18. #ifdef Py_LIMITED_API
  19. @@ -382,25 +382,10 @@ static PyTypeObject *__Pyx_ImportType_$cyversion(PyObject *module, const char *m
  20. itemsize = (Py_ssize_t)alignment;
  21. }
  22. if ((size_t)(basicsize + itemsize) < size) {
  23. - PyErr_Format(PyExc_ValueError,
  24. - "%.200s.%.200s size changed, may indicate binary incompatibility. "
  25. - "Expected %zd from C header, got %zd from PyObject",
  26. - module_name, class_name, size, basicsize);
  27. - goto bad;
  28. }
  29. if (check_size == __Pyx_ImportType_CheckSize_Error_$cyversion && (size_t)basicsize != size) {
  30. - PyErr_Format(PyExc_ValueError,
  31. - "%.200s.%.200s size changed, may indicate binary incompatibility. "
  32. - "Expected %zd from C header, got %zd from PyObject",
  33. - module_name, class_name, size, basicsize);
  34. - goto bad;
  35. }
  36. else if (check_size == __Pyx_ImportType_CheckSize_Warn_$cyversion && (size_t)basicsize > size) {
  37. - PyOS_snprintf(warning, sizeof(warning),
  38. - "%s.%s size changed, may indicate binary incompatibility. "
  39. - "Expected %zd from C header, got %zd from PyObject",
  40. - module_name, class_name, size, basicsize);
  41. - if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
  42. }
  43. /* check_size == __Pyx_ImportType_CheckSize_Ignore does not warn nor error */
  44. return (PyTypeObject *)result;