OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
3.4 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../mod_python/mod_python-3.3.1-pycapsule.patch
  5. # Copyright (C) 2011 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. Reference: https://bugzilla.redhat.com/show_bug.cgi?id=640432
  17. Origin: Fedora Project
  18. http://pkgs.fedoraproject.org/gitweb/?p=mod_python.git;a=blob_plain;f=mod_python-3.3.1-pycapsule.patch;hb=HEAD
  19. diff -Nur mod_python-3.3.1.orig/src/connobject.c mod_python-3.3.1/src/connobject.c
  20. --- mod_python-3.3.1.orig/src/connobject.c 2006-12-03 15:36:37.000000000 +1100
  21. +++ mod_python-3.3.1/src/connobject.c 2010-10-20 19:33:28.853600297 +1100
  22. @@ -426,7 +426,7 @@
  23. return (PyObject *)self->hlo;
  24. }
  25. else if (strcmp(name, "_conn_rec") == 0) {
  26. - return PyCObject_FromVoidPtr(self->conn, 0);
  27. + return PyCapsule_New(self->conn, "MpConn", 0);
  28. }
  29. else
  30. return PyMember_Get((char *)self->conn, conn_memberlist, name);
  31. diff -Nur mod_python-3.3.1.orig/src/mod_python.c mod_python-3.3.1/src/mod_python.c
  32. --- mod_python-3.3.1.orig/src/mod_python.c 2006-11-09 17:21:23.000000000 +1100
  33. +++ mod_python-3.3.1/src/mod_python.c 2010-10-20 19:34:44.124630590 +1100
  34. @@ -182,7 +182,7 @@
  35. idata->istate = istate;
  36. /* obcallback will be created on first use */
  37. idata->obcallback = NULL;
  38. - p = PyCObject_FromVoidPtr((void *) idata, NULL);
  39. + p = PyCapsule_New((void *) idata, "MpInterpreterData", NULL);
  40. PyDict_SetItemString(interpreters, (char *)name, p);
  41. Py_DECREF(p);
  42. @@ -261,7 +261,7 @@
  43. idata = save_interpreter(name, istate);
  44. }
  45. else {
  46. - idata = (interpreterdata *)PyCObject_AsVoidPtr(p);
  47. + idata = (interpreterdata *)PyCapsule_GetPointer(p, "MpInterpreterData");
  48. }
  49. #ifdef WITH_THREAD
  50. diff -Nur mod_python-3.3.1.orig/src/requestobject.c mod_python-3.3.1/src/requestobject.c
  51. --- mod_python-3.3.1.orig/src/requestobject.c 2006-12-03 15:36:37.000000000 +1100
  52. +++ mod_python-3.3.1/src/requestobject.c 2010-10-20 19:33:28.853600297 +1100
  53. @@ -1611,7 +1611,7 @@
  54. }
  55. }
  56. else if (strcmp(name, "_request_rec") == 0) {
  57. - return PyCObject_FromVoidPtr(self->request_rec, 0);
  58. + return PyCapsule_New(self->request_rec, "MpRequest", 0);
  59. }
  60. else
  61. return PyMember_GetOne((char*)self->request_rec,
  62. diff -Nur mod_python-3.3.1.orig/src/serverobject.c mod_python-3.3.1/src/serverobject.c
  63. --- mod_python-3.3.1.orig/src/serverobject.c 2006-12-03 15:36:37.000000000 +1100
  64. +++ mod_python-3.3.1/src/serverobject.c 2010-10-20 19:33:28.856933673 +1100
  65. @@ -225,7 +225,7 @@
  66. static PyObject *getsrv_recmbr(serverobject *self, void *name)
  67. {
  68. if (strcmp(name, "_server_rec") == 0) {
  69. - return PyCObject_FromVoidPtr(self->server, 0);
  70. + return PyCapsule_New(self->server, "MpServer", 0);
  71. }
  72. return PyMember_GetOne((char*)self->server,
  73. find_memberdef(server_rec_mbrs, name));