• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*[clinic input]
2 preserve
3 [clinic start generated code]*/
4 
5 PyDoc_STRVAR(_testmultiphase_StateAccessType_get_defining_module__doc__,
6 "get_defining_module($self, /)\n"
7 "--\n"
8 "\n"
9 "Return the module of the defining class.\n"
10 "\n"
11 "Also tests that result of _PyType_GetModuleByDef matches defining_class\'s\n"
12 "module.");
13 
14 #define _TESTMULTIPHASE_STATEACCESSTYPE_GET_DEFINING_MODULE_METHODDEF    \
15     {"get_defining_module", (PyCFunction)(void(*)(void))_testmultiphase_StateAccessType_get_defining_module, METH_METHOD|METH_FASTCALL|METH_KEYWORDS, _testmultiphase_StateAccessType_get_defining_module__doc__},
16 
17 static PyObject *
18 _testmultiphase_StateAccessType_get_defining_module_impl(StateAccessTypeObject *self,
19                                                          PyTypeObject *cls);
20 
21 static PyObject *
_testmultiphase_StateAccessType_get_defining_module(StateAccessTypeObject * self,PyTypeObject * cls,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)22 _testmultiphase_StateAccessType_get_defining_module(StateAccessTypeObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
23 {
24     PyObject *return_value = NULL;
25     static const char * const _keywords[] = { NULL};
26     static _PyArg_Parser _parser = {":get_defining_module", _keywords, 0};
27 
28     if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser
29         )) {
30         goto exit;
31     }
32     return_value = _testmultiphase_StateAccessType_get_defining_module_impl(self, cls);
33 
34 exit:
35     return return_value;
36 }
37 
38 PyDoc_STRVAR(_testmultiphase_StateAccessType_increment_count_clinic__doc__,
39 "increment_count_clinic($self, /, n=1, *, twice=False)\n"
40 "--\n"
41 "\n"
42 "Add \'n\' from the module-state counter.\n"
43 "\n"
44 "Pass \'twice\' to double that amount.\n"
45 "\n"
46 "This tests Argument Clinic support for defining_class.");
47 
48 #define _TESTMULTIPHASE_STATEACCESSTYPE_INCREMENT_COUNT_CLINIC_METHODDEF    \
49     {"increment_count_clinic", (PyCFunction)(void(*)(void))_testmultiphase_StateAccessType_increment_count_clinic, METH_METHOD|METH_FASTCALL|METH_KEYWORDS, _testmultiphase_StateAccessType_increment_count_clinic__doc__},
50 
51 static PyObject *
52 _testmultiphase_StateAccessType_increment_count_clinic_impl(StateAccessTypeObject *self,
53                                                             PyTypeObject *cls,
54                                                             int n, int twice);
55 
56 static PyObject *
_testmultiphase_StateAccessType_increment_count_clinic(StateAccessTypeObject * self,PyTypeObject * cls,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)57 _testmultiphase_StateAccessType_increment_count_clinic(StateAccessTypeObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
58 {
59     PyObject *return_value = NULL;
60     static const char * const _keywords[] = {"n", "twice", NULL};
61     static _PyArg_Parser _parser = {"|i$p:increment_count_clinic", _keywords, 0};
62     int n = 1;
63     int twice = 0;
64 
65     if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser,
66         &n, &twice)) {
67         goto exit;
68     }
69     return_value = _testmultiphase_StateAccessType_increment_count_clinic_impl(self, cls, n, twice);
70 
71 exit:
72     return return_value;
73 }
74 
75 PyDoc_STRVAR(_testmultiphase_StateAccessType_get_count__doc__,
76 "get_count($self, /)\n"
77 "--\n"
78 "\n"
79 "Return the value of the module-state counter.");
80 
81 #define _TESTMULTIPHASE_STATEACCESSTYPE_GET_COUNT_METHODDEF    \
82     {"get_count", (PyCFunction)(void(*)(void))_testmultiphase_StateAccessType_get_count, METH_METHOD|METH_FASTCALL|METH_KEYWORDS, _testmultiphase_StateAccessType_get_count__doc__},
83 
84 static PyObject *
85 _testmultiphase_StateAccessType_get_count_impl(StateAccessTypeObject *self,
86                                                PyTypeObject *cls);
87 
88 static PyObject *
_testmultiphase_StateAccessType_get_count(StateAccessTypeObject * self,PyTypeObject * cls,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)89 _testmultiphase_StateAccessType_get_count(StateAccessTypeObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
90 {
91     PyObject *return_value = NULL;
92     static const char * const _keywords[] = { NULL};
93     static _PyArg_Parser _parser = {":get_count", _keywords, 0};
94 
95     if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser
96         )) {
97         goto exit;
98     }
99     return_value = _testmultiphase_StateAccessType_get_count_impl(self, cls);
100 
101 exit:
102     return return_value;
103 }
104 /*[clinic end generated code: output=f01137bb3b373e14 input=a9049054013a1b77]*/
105