Skip to content

Commit

Permalink
Use offset-based Ci_Py{Class,Static}Method_GetFunc for 3.10 and 3.12
Browse files Browse the repository at this point in the history
Summary:
Deleting the exported symbol from 3.10.cinder and using the newer offset-based
functions for both Python versions.

Reviewed By: jbower-fb

Differential Revision: D60386312

fbshipit-source-id: 698e7cb60aaece8a4b9677ae5be5b4f4e10ca686
  • Loading branch information
Alex Malyshev authored and facebook-github-bot committed Jul 29, 2024
1 parent a899b62 commit 30f8626
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
3 changes: 0 additions & 3 deletions Include/cinder/exports.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ extern "C" {
* CinderX work.
*/

CiAPI_FUNC(PyObject *) Ci_PyClassMethod_GetFunc(PyObject *method);
CiAPI_FUNC(PyObject *) Ci_PyStaticMethod_GetFunc(PyObject *method);

CiAPI_FUNC(PyObject *) Ci_dict_subscript(PyObject *mp, PyObject *key);
CiAPI_FUNC(PyObject *) Ci_list_subscript(PyObject *list, PyObject *item);
CiAPI_FUNC(PyObject *) Ci_tuple_subscript(PyObject *self, PyObject *item);
Expand Down
12 changes: 0 additions & 12 deletions Objects/funcobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1280,15 +1280,3 @@ PyStaticMethod_New(PyObject *callable)
}
return (PyObject *)sm;
}

PyObject *
Ci_PyClassMethod_GetFunc(PyObject *method) {
classmethod *class_method = (classmethod *) method;
return class_method->cm_callable;
}

PyObject *
Ci_PyStaticMethod_GetFunc(PyObject *sm) {
staticmethod *method = (staticmethod *)sm;
return method->sm_callable;
}

0 comments on commit 30f8626

Please sign in to comment.