generated from ProjectPythia/cookbook-template
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1220f76
commit f561722
Showing
11 changed files
with
102 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/pybeamb/pybeamb_compat.h b/pybeamb/pybeamb_compat.h | ||
index 3caf9cd..49b79ea 100644 | ||
--- a/pybeamb/pybeamb_compat.h | ||
+++ b/pybeamb/pybeamb_compat.h | ||
@@ -73,7 +73,7 @@ along with RAVE. If not, see <http://www.gnu.org/licenses/>. | ||
#define MOD_INIT_CREATE_CAPI(ptr, name) PyCapsule_New(ptr, name, NULL) | ||
#define MOD_INIT_IS_CAPI(ptr) PyCapsule_CheckExact(ptr) | ||
#define MOD_INIT_GET_CAPI(ptr, name) PyCapsule_GetPointer(ptr, name) | ||
-#define MOD_INIT_SETUP_TYPE(itype, otype) Py_TYPE(&itype) = otype | ||
+#define MOD_INIT_SETUP_TYPE(itype, otype) Py_SET_TYPE(&itype, otype) | ||
#define MOD_INIT_VERIFY_TYPE_READY(type) if (PyType_Ready(type) < 0) return MOD_INIT_ERROR | ||
|
||
#else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/pyropo/pyropo_compat.h b/pyropo/pyropo_compat.h | ||
index 9fdd586..5be12c0 100644 | ||
--- a/pyropo/pyropo_compat.h | ||
+++ b/pyropo/pyropo_compat.h | ||
@@ -73,7 +73,7 @@ along with RAVE. If not, see <http://www.gnu.org/licenses/>. | ||
#define MOD_INIT_CREATE_CAPI(ptr, name) PyCapsule_New(ptr, name, NULL) | ||
#define MOD_INIT_IS_CAPI(ptr) PyCapsule_CheckExact(ptr) | ||
#define MOD_INIT_GET_CAPI(ptr, name) PyCapsule_GetPointer(ptr, name) | ||
-#define MOD_INIT_SETUP_TYPE(itype, otype) Py_TYPE(&itype) = otype | ||
+#define MOD_INIT_SETUP_TYPE(itype, otype) Py_SET_TYPE(&itype, otype) | ||
#define MOD_INIT_VERIFY_TYPE_READY(type) if (PyType_Ready(type) < 0) return MOD_INIT_ERROR | ||
|
||
#else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/librave/pyapi/pyravecompat.h b/librave/pyapi/pyravecompat.h | ||
index 846e7a7..8167bfa 100644 | ||
--- a/librave/pyapi/pyravecompat.h | ||
+++ b/librave/pyapi/pyravecompat.h | ||
@@ -86,7 +86,7 @@ PyObject* PyRaveAPI_StringOrUnicode_FromASCII(const char *buffer); | ||
#define MOD_INIT_CREATE_CAPI(ptr, name) PyCapsule_New(ptr, name, NULL) | ||
#define MOD_INIT_IS_CAPI(ptr) PyCapsule_CheckExact(ptr) | ||
#define MOD_INIT_GET_CAPI(ptr, name) PyCapsule_GetPointer(ptr, name) | ||
-#define MOD_INIT_SETUP_TYPE(itype, otype) Py_TYPE(&itype) = otype | ||
+#define MOD_INIT_SETUP_TYPE(itype, otype) Py_SET_TYPE(&itype, otype) | ||
#define MOD_INIT_VERIFY_TYPE_READY(type) if (PyType_Ready(type) < 0) return MOD_INIT_ERROR | ||
|
||
#else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
diff --git a/pyhlhdf/pyhlcompat.h b/pyhlhdf/pyhlcompat.h | ||
index aadbdac..73ad6b9 100644 | ||
--- a/pyhlhdf/pyhlcompat.h | ||
+++ b/pyhlhdf/pyhlcompat.h | ||
@@ -82,7 +82,7 @@ PyObject* PyHlhdf_StringOrUnicode_FromASCII(const char *buffer, Py_ssize_t size) | ||
PyModuleDef_HEAD_INIT, name, doc, -1, methods, NULL, NULL, NULL, NULL }; \ | ||
ob = PyModule_Create(&moduledef); | ||
|
||
-#define MOD_INIT_SETUP_TYPE(itype, otype) Py_TYPE(&itype) = otype | ||
+#define MOD_INIT_SETUP_TYPE(itype, otype) Py_SET_TYPE(&itype, otype) | ||
#define MOD_INIT_VERIFY_TYPE_READY(type) if (PyType_Ready(type) < 0) return MOD_INIT_ERROR | ||
|
||
#else | ||
diff --git a/test/python/rave_info_type.c b/test/python/rave_info_type.c | ||
index 5451301..9ac225b 100644 | ||
--- a/test/python/rave_info_type.c | ||
+++ b/test/python/rave_info_type.c | ||
@@ -334,7 +334,8 @@ static PyTypeObject RaveInfoType_Type = { | ||
(getattrofunc)_getattr_typeo, /*tp_getattro*/ | ||
(setattrofunc)0, /*tp_setattro*/ | ||
0, /*tp_as_buffer*/ | ||
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /*tp_flags*/ | ||
+ Py_TPFLAGS_DEFAULT, /*tp_flags*/ | ||
+ //Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /*tp_flags*/ | ||
0, /*tp_doc*/ | ||
(traverseproc)0, /*tp_traverse*/ | ||
(inquiry)0, /*tp_clear*/ | ||
@@ -378,7 +379,8 @@ static PyTypeObject RaveInfoObject_Type = { | ||
(getattrofunc)_getattro_object,/*tp_getattro*/ | ||
(setattrofunc)_setattro_object,/*tp_setattro*/ | ||
0, /*tp_as_buffer*/ | ||
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /*tp_flags*/ | ||
+ //Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /*tp_flags*/ | ||
+ Py_TPFLAGS_DEFAULT, /*tp_flags*/ | ||
0, /*tp_doc*/ | ||
(traverseproc)0, /*tp_traverse*/ | ||
(inquiry)0, /*tp_clear*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/pywrwp/pywrwp_compat.h b/pywrwp/pywrwp_compat.h | ||
index 3caf9cd..49b79ea 100644 | ||
--- a/pywrwp/pywrwp_compat.h | ||
+++ b/pywrwp/pywrwp_compat.h | ||
@@ -73,7 +73,7 @@ along with RAVE. If not, see <http://www.gnu.org/licenses/>. | ||
#define MOD_INIT_CREATE_CAPI(ptr, name) PyCapsule_New(ptr, name, NULL) | ||
#define MOD_INIT_IS_CAPI(ptr) PyCapsule_CheckExact(ptr) | ||
#define MOD_INIT_GET_CAPI(ptr, name) PyCapsule_GetPointer(ptr, name) | ||
-#define MOD_INIT_SETUP_TYPE(itype, otype) Py_TYPE(&itype) = otype | ||
+#define MOD_INIT_SETUP_TYPE(itype, otype) Py_SET_TYPE(&itype, otype) | ||
#define MOD_INIT_VERIFY_TYPE_READY(type) if (PyType_Ready(type) < 0) return MOD_INIT_ERROR | ||
|
||
#else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters