Skip to content

Commit

Permalink
added type hinting support for C extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco-Sulla committed Nov 18, 2021
1 parent aec4478 commit ecf771c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion frozendict/src/3_10/frozendictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2132,7 +2132,8 @@ static PyMethodDef frozen_mapp_methods[] = {
{"copy", (PyCFunction)frozendict_copy, METH_NOARGS,
copy__doc__},
DICT___REVERSED___METHODDEF
{"__reduce__", (PyCFunction)(void(*)(void))frozendict_reduce, METH_NOARGS,
{"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, "See PEP 585"},
{"__reduce__", (PyCFunction)(void(*)(void))frozendict_reduce, METH_NOARGS,
""},
{NULL, NULL} /* sentinel */
};
Expand Down
5 changes: 3 additions & 2 deletions frozendict/src/3_9/frozendictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2128,7 +2128,8 @@ static PyMethodDef frozen_mapp_methods[] = {
{"copy", (PyCFunction)frozendict_copy, METH_NOARGS,
copy__doc__},
DICT___REVERSED___METHODDEF
{"__reduce__", (PyCFunction)(void(*)(void))frozendict_reduce, METH_NOARGS,
{"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, "See PEP 585"},
{"__reduce__", (PyCFunction)(void(*)(void))frozendict_reduce, METH_NOARGS,
""},
{NULL, NULL} /* sentinel */
};
Expand Down Expand Up @@ -2496,7 +2497,7 @@ PyTypeObject PyCoold_Type = {
0, /* tp_getattr */
0, /* tp_setattr */
0, /* tp_as_async */
(reprfunc)frozendict_repr, /* tp_repr */
(reprfunc)frozendict_repr, /* tp_repr */
0, /* tp_as_number */
&dict_as_sequence, /* tp_as_sequence */
&frozendict_as_mapping, /* tp_as_mapping */
Expand Down

0 comments on commit ecf771c

Please sign in to comment.