LCOV - code coverage report
Current view: top level - Modules/clinic - _tkinter.c.h (source / functions) Hit Total Coverage
Test: CPython 3.12 LCOV report [commit 5e6661bce9] Lines: 0 304 0.0 %
Date: 2023-03-20 08:15:36 Functions: 0 22 0.0 %
Branches: 0 176 0.0 %

           Branch data     Line data    Source code
       1                 :            : /*[clinic input]
       2                 :            : preserve
       3                 :            : [clinic start generated code]*/
       4                 :            : 
       5                 :            : #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
       6                 :            : #  include "pycore_gc.h"            // PyGC_Head
       7                 :            : #  include "pycore_runtime.h"       // _Py_ID()
       8                 :            : #endif
       9                 :            : 
      10                 :            : 
      11                 :            : PyDoc_STRVAR(_tkinter_tkapp_eval__doc__,
      12                 :            : "eval($self, script, /)\n"
      13                 :            : "--\n"
      14                 :            : "\n");
      15                 :            : 
      16                 :            : #define _TKINTER_TKAPP_EVAL_METHODDEF    \
      17                 :            :     {"eval", (PyCFunction)_tkinter_tkapp_eval, METH_O, _tkinter_tkapp_eval__doc__},
      18                 :            : 
      19                 :            : static PyObject *
      20                 :            : _tkinter_tkapp_eval_impl(TkappObject *self, const char *script);
      21                 :            : 
      22                 :            : static PyObject *
      23                 :          0 : _tkinter_tkapp_eval(TkappObject *self, PyObject *arg)
      24                 :            : {
      25                 :          0 :     PyObject *return_value = NULL;
      26                 :            :     const char *script;
      27                 :            : 
      28         [ #  # ]:          0 :     if (!PyUnicode_Check(arg)) {
      29                 :          0 :         _PyArg_BadArgument("eval", "argument", "str", arg);
      30                 :          0 :         goto exit;
      31                 :            :     }
      32                 :            :     Py_ssize_t script_length;
      33                 :          0 :     script = PyUnicode_AsUTF8AndSize(arg, &script_length);
      34         [ #  # ]:          0 :     if (script == NULL) {
      35                 :          0 :         goto exit;
      36                 :            :     }
      37         [ #  # ]:          0 :     if (strlen(script) != (size_t)script_length) {
      38                 :          0 :         PyErr_SetString(PyExc_ValueError, "embedded null character");
      39                 :          0 :         goto exit;
      40                 :            :     }
      41                 :          0 :     return_value = _tkinter_tkapp_eval_impl(self, script);
      42                 :            : 
      43                 :          0 : exit:
      44                 :          0 :     return return_value;
      45                 :            : }
      46                 :            : 
      47                 :            : PyDoc_STRVAR(_tkinter_tkapp_evalfile__doc__,
      48                 :            : "evalfile($self, fileName, /)\n"
      49                 :            : "--\n"
      50                 :            : "\n");
      51                 :            : 
      52                 :            : #define _TKINTER_TKAPP_EVALFILE_METHODDEF    \
      53                 :            :     {"evalfile", (PyCFunction)_tkinter_tkapp_evalfile, METH_O, _tkinter_tkapp_evalfile__doc__},
      54                 :            : 
      55                 :            : static PyObject *
      56                 :            : _tkinter_tkapp_evalfile_impl(TkappObject *self, const char *fileName);
      57                 :            : 
      58                 :            : static PyObject *
      59                 :          0 : _tkinter_tkapp_evalfile(TkappObject *self, PyObject *arg)
      60                 :            : {
      61                 :          0 :     PyObject *return_value = NULL;
      62                 :            :     const char *fileName;
      63                 :            : 
      64         [ #  # ]:          0 :     if (!PyUnicode_Check(arg)) {
      65                 :          0 :         _PyArg_BadArgument("evalfile", "argument", "str", arg);
      66                 :          0 :         goto exit;
      67                 :            :     }
      68                 :            :     Py_ssize_t fileName_length;
      69                 :          0 :     fileName = PyUnicode_AsUTF8AndSize(arg, &fileName_length);
      70         [ #  # ]:          0 :     if (fileName == NULL) {
      71                 :          0 :         goto exit;
      72                 :            :     }
      73         [ #  # ]:          0 :     if (strlen(fileName) != (size_t)fileName_length) {
      74                 :          0 :         PyErr_SetString(PyExc_ValueError, "embedded null character");
      75                 :          0 :         goto exit;
      76                 :            :     }
      77                 :          0 :     return_value = _tkinter_tkapp_evalfile_impl(self, fileName);
      78                 :            : 
      79                 :          0 : exit:
      80                 :          0 :     return return_value;
      81                 :            : }
      82                 :            : 
      83                 :            : PyDoc_STRVAR(_tkinter_tkapp_record__doc__,
      84                 :            : "record($self, script, /)\n"
      85                 :            : "--\n"
      86                 :            : "\n");
      87                 :            : 
      88                 :            : #define _TKINTER_TKAPP_RECORD_METHODDEF    \
      89                 :            :     {"record", (PyCFunction)_tkinter_tkapp_record, METH_O, _tkinter_tkapp_record__doc__},
      90                 :            : 
      91                 :            : static PyObject *
      92                 :            : _tkinter_tkapp_record_impl(TkappObject *self, const char *script);
      93                 :            : 
      94                 :            : static PyObject *
      95                 :          0 : _tkinter_tkapp_record(TkappObject *self, PyObject *arg)
      96                 :            : {
      97                 :          0 :     PyObject *return_value = NULL;
      98                 :            :     const char *script;
      99                 :            : 
     100         [ #  # ]:          0 :     if (!PyUnicode_Check(arg)) {
     101                 :          0 :         _PyArg_BadArgument("record", "argument", "str", arg);
     102                 :          0 :         goto exit;
     103                 :            :     }
     104                 :            :     Py_ssize_t script_length;
     105                 :          0 :     script = PyUnicode_AsUTF8AndSize(arg, &script_length);
     106         [ #  # ]:          0 :     if (script == NULL) {
     107                 :          0 :         goto exit;
     108                 :            :     }
     109         [ #  # ]:          0 :     if (strlen(script) != (size_t)script_length) {
     110                 :          0 :         PyErr_SetString(PyExc_ValueError, "embedded null character");
     111                 :          0 :         goto exit;
     112                 :            :     }
     113                 :          0 :     return_value = _tkinter_tkapp_record_impl(self, script);
     114                 :            : 
     115                 :          0 : exit:
     116                 :          0 :     return return_value;
     117                 :            : }
     118                 :            : 
     119                 :            : PyDoc_STRVAR(_tkinter_tkapp_adderrorinfo__doc__,
     120                 :            : "adderrorinfo($self, msg, /)\n"
     121                 :            : "--\n"
     122                 :            : "\n");
     123                 :            : 
     124                 :            : #define _TKINTER_TKAPP_ADDERRORINFO_METHODDEF    \
     125                 :            :     {"adderrorinfo", (PyCFunction)_tkinter_tkapp_adderrorinfo, METH_O, _tkinter_tkapp_adderrorinfo__doc__},
     126                 :            : 
     127                 :            : static PyObject *
     128                 :            : _tkinter_tkapp_adderrorinfo_impl(TkappObject *self, const char *msg);
     129                 :            : 
     130                 :            : static PyObject *
     131                 :          0 : _tkinter_tkapp_adderrorinfo(TkappObject *self, PyObject *arg)
     132                 :            : {
     133                 :          0 :     PyObject *return_value = NULL;
     134                 :            :     const char *msg;
     135                 :            : 
     136         [ #  # ]:          0 :     if (!PyUnicode_Check(arg)) {
     137                 :          0 :         _PyArg_BadArgument("adderrorinfo", "argument", "str", arg);
     138                 :          0 :         goto exit;
     139                 :            :     }
     140                 :            :     Py_ssize_t msg_length;
     141                 :          0 :     msg = PyUnicode_AsUTF8AndSize(arg, &msg_length);
     142         [ #  # ]:          0 :     if (msg == NULL) {
     143                 :          0 :         goto exit;
     144                 :            :     }
     145         [ #  # ]:          0 :     if (strlen(msg) != (size_t)msg_length) {
     146                 :          0 :         PyErr_SetString(PyExc_ValueError, "embedded null character");
     147                 :          0 :         goto exit;
     148                 :            :     }
     149                 :          0 :     return_value = _tkinter_tkapp_adderrorinfo_impl(self, msg);
     150                 :            : 
     151                 :          0 : exit:
     152                 :          0 :     return return_value;
     153                 :            : }
     154                 :            : 
     155                 :            : PyDoc_STRVAR(_tkinter_tkapp_getint__doc__,
     156                 :            : "getint($self, arg, /)\n"
     157                 :            : "--\n"
     158                 :            : "\n");
     159                 :            : 
     160                 :            : #define _TKINTER_TKAPP_GETINT_METHODDEF    \
     161                 :            :     {"getint", (PyCFunction)_tkinter_tkapp_getint, METH_O, _tkinter_tkapp_getint__doc__},
     162                 :            : 
     163                 :            : PyDoc_STRVAR(_tkinter_tkapp_getdouble__doc__,
     164                 :            : "getdouble($self, arg, /)\n"
     165                 :            : "--\n"
     166                 :            : "\n");
     167                 :            : 
     168                 :            : #define _TKINTER_TKAPP_GETDOUBLE_METHODDEF    \
     169                 :            :     {"getdouble", (PyCFunction)_tkinter_tkapp_getdouble, METH_O, _tkinter_tkapp_getdouble__doc__},
     170                 :            : 
     171                 :            : PyDoc_STRVAR(_tkinter_tkapp_getboolean__doc__,
     172                 :            : "getboolean($self, arg, /)\n"
     173                 :            : "--\n"
     174                 :            : "\n");
     175                 :            : 
     176                 :            : #define _TKINTER_TKAPP_GETBOOLEAN_METHODDEF    \
     177                 :            :     {"getboolean", (PyCFunction)_tkinter_tkapp_getboolean, METH_O, _tkinter_tkapp_getboolean__doc__},
     178                 :            : 
     179                 :            : PyDoc_STRVAR(_tkinter_tkapp_exprstring__doc__,
     180                 :            : "exprstring($self, s, /)\n"
     181                 :            : "--\n"
     182                 :            : "\n");
     183                 :            : 
     184                 :            : #define _TKINTER_TKAPP_EXPRSTRING_METHODDEF    \
     185                 :            :     {"exprstring", (PyCFunction)_tkinter_tkapp_exprstring, METH_O, _tkinter_tkapp_exprstring__doc__},
     186                 :            : 
     187                 :            : static PyObject *
     188                 :            : _tkinter_tkapp_exprstring_impl(TkappObject *self, const char *s);
     189                 :            : 
     190                 :            : static PyObject *
     191                 :          0 : _tkinter_tkapp_exprstring(TkappObject *self, PyObject *arg)
     192                 :            : {
     193                 :          0 :     PyObject *return_value = NULL;
     194                 :            :     const char *s;
     195                 :            : 
     196         [ #  # ]:          0 :     if (!PyUnicode_Check(arg)) {
     197                 :          0 :         _PyArg_BadArgument("exprstring", "argument", "str", arg);
     198                 :          0 :         goto exit;
     199                 :            :     }
     200                 :            :     Py_ssize_t s_length;
     201                 :          0 :     s = PyUnicode_AsUTF8AndSize(arg, &s_length);
     202         [ #  # ]:          0 :     if (s == NULL) {
     203                 :          0 :         goto exit;
     204                 :            :     }
     205         [ #  # ]:          0 :     if (strlen(s) != (size_t)s_length) {
     206                 :          0 :         PyErr_SetString(PyExc_ValueError, "embedded null character");
     207                 :          0 :         goto exit;
     208                 :            :     }
     209                 :          0 :     return_value = _tkinter_tkapp_exprstring_impl(self, s);
     210                 :            : 
     211                 :          0 : exit:
     212                 :          0 :     return return_value;
     213                 :            : }
     214                 :            : 
     215                 :            : PyDoc_STRVAR(_tkinter_tkapp_exprlong__doc__,
     216                 :            : "exprlong($self, s, /)\n"
     217                 :            : "--\n"
     218                 :            : "\n");
     219                 :            : 
     220                 :            : #define _TKINTER_TKAPP_EXPRLONG_METHODDEF    \
     221                 :            :     {"exprlong", (PyCFunction)_tkinter_tkapp_exprlong, METH_O, _tkinter_tkapp_exprlong__doc__},
     222                 :            : 
     223                 :            : static PyObject *
     224                 :            : _tkinter_tkapp_exprlong_impl(TkappObject *self, const char *s);
     225                 :            : 
     226                 :            : static PyObject *
     227                 :          0 : _tkinter_tkapp_exprlong(TkappObject *self, PyObject *arg)
     228                 :            : {
     229                 :          0 :     PyObject *return_value = NULL;
     230                 :            :     const char *s;
     231                 :            : 
     232         [ #  # ]:          0 :     if (!PyUnicode_Check(arg)) {
     233                 :          0 :         _PyArg_BadArgument("exprlong", "argument", "str", arg);
     234                 :          0 :         goto exit;
     235                 :            :     }
     236                 :            :     Py_ssize_t s_length;
     237                 :          0 :     s = PyUnicode_AsUTF8AndSize(arg, &s_length);
     238         [ #  # ]:          0 :     if (s == NULL) {
     239                 :          0 :         goto exit;
     240                 :            :     }
     241         [ #  # ]:          0 :     if (strlen(s) != (size_t)s_length) {
     242                 :          0 :         PyErr_SetString(PyExc_ValueError, "embedded null character");
     243                 :          0 :         goto exit;
     244                 :            :     }
     245                 :          0 :     return_value = _tkinter_tkapp_exprlong_impl(self, s);
     246                 :            : 
     247                 :          0 : exit:
     248                 :          0 :     return return_value;
     249                 :            : }
     250                 :            : 
     251                 :            : PyDoc_STRVAR(_tkinter_tkapp_exprdouble__doc__,
     252                 :            : "exprdouble($self, s, /)\n"
     253                 :            : "--\n"
     254                 :            : "\n");
     255                 :            : 
     256                 :            : #define _TKINTER_TKAPP_EXPRDOUBLE_METHODDEF    \
     257                 :            :     {"exprdouble", (PyCFunction)_tkinter_tkapp_exprdouble, METH_O, _tkinter_tkapp_exprdouble__doc__},
     258                 :            : 
     259                 :            : static PyObject *
     260                 :            : _tkinter_tkapp_exprdouble_impl(TkappObject *self, const char *s);
     261                 :            : 
     262                 :            : static PyObject *
     263                 :          0 : _tkinter_tkapp_exprdouble(TkappObject *self, PyObject *arg)
     264                 :            : {
     265                 :          0 :     PyObject *return_value = NULL;
     266                 :            :     const char *s;
     267                 :            : 
     268         [ #  # ]:          0 :     if (!PyUnicode_Check(arg)) {
     269                 :          0 :         _PyArg_BadArgument("exprdouble", "argument", "str", arg);
     270                 :          0 :         goto exit;
     271                 :            :     }
     272                 :            :     Py_ssize_t s_length;
     273                 :          0 :     s = PyUnicode_AsUTF8AndSize(arg, &s_length);
     274         [ #  # ]:          0 :     if (s == NULL) {
     275                 :          0 :         goto exit;
     276                 :            :     }
     277         [ #  # ]:          0 :     if (strlen(s) != (size_t)s_length) {
     278                 :          0 :         PyErr_SetString(PyExc_ValueError, "embedded null character");
     279                 :          0 :         goto exit;
     280                 :            :     }
     281                 :          0 :     return_value = _tkinter_tkapp_exprdouble_impl(self, s);
     282                 :            : 
     283                 :          0 : exit:
     284                 :          0 :     return return_value;
     285                 :            : }
     286                 :            : 
     287                 :            : PyDoc_STRVAR(_tkinter_tkapp_exprboolean__doc__,
     288                 :            : "exprboolean($self, s, /)\n"
     289                 :            : "--\n"
     290                 :            : "\n");
     291                 :            : 
     292                 :            : #define _TKINTER_TKAPP_EXPRBOOLEAN_METHODDEF    \
     293                 :            :     {"exprboolean", (PyCFunction)_tkinter_tkapp_exprboolean, METH_O, _tkinter_tkapp_exprboolean__doc__},
     294                 :            : 
     295                 :            : static PyObject *
     296                 :            : _tkinter_tkapp_exprboolean_impl(TkappObject *self, const char *s);
     297                 :            : 
     298                 :            : static PyObject *
     299                 :          0 : _tkinter_tkapp_exprboolean(TkappObject *self, PyObject *arg)
     300                 :            : {
     301                 :          0 :     PyObject *return_value = NULL;
     302                 :            :     const char *s;
     303                 :            : 
     304         [ #  # ]:          0 :     if (!PyUnicode_Check(arg)) {
     305                 :          0 :         _PyArg_BadArgument("exprboolean", "argument", "str", arg);
     306                 :          0 :         goto exit;
     307                 :            :     }
     308                 :            :     Py_ssize_t s_length;
     309                 :          0 :     s = PyUnicode_AsUTF8AndSize(arg, &s_length);
     310         [ #  # ]:          0 :     if (s == NULL) {
     311                 :          0 :         goto exit;
     312                 :            :     }
     313         [ #  # ]:          0 :     if (strlen(s) != (size_t)s_length) {
     314                 :          0 :         PyErr_SetString(PyExc_ValueError, "embedded null character");
     315                 :          0 :         goto exit;
     316                 :            :     }
     317                 :          0 :     return_value = _tkinter_tkapp_exprboolean_impl(self, s);
     318                 :            : 
     319                 :          0 : exit:
     320                 :          0 :     return return_value;
     321                 :            : }
     322                 :            : 
     323                 :            : PyDoc_STRVAR(_tkinter_tkapp_splitlist__doc__,
     324                 :            : "splitlist($self, arg, /)\n"
     325                 :            : "--\n"
     326                 :            : "\n");
     327                 :            : 
     328                 :            : #define _TKINTER_TKAPP_SPLITLIST_METHODDEF    \
     329                 :            :     {"splitlist", (PyCFunction)_tkinter_tkapp_splitlist, METH_O, _tkinter_tkapp_splitlist__doc__},
     330                 :            : 
     331                 :            : PyDoc_STRVAR(_tkinter_tkapp_createcommand__doc__,
     332                 :            : "createcommand($self, name, func, /)\n"
     333                 :            : "--\n"
     334                 :            : "\n");
     335                 :            : 
     336                 :            : #define _TKINTER_TKAPP_CREATECOMMAND_METHODDEF    \
     337                 :            :     {"createcommand", _PyCFunction_CAST(_tkinter_tkapp_createcommand), METH_FASTCALL, _tkinter_tkapp_createcommand__doc__},
     338                 :            : 
     339                 :            : static PyObject *
     340                 :            : _tkinter_tkapp_createcommand_impl(TkappObject *self, const char *name,
     341                 :            :                                   PyObject *func);
     342                 :            : 
     343                 :            : static PyObject *
     344                 :          0 : _tkinter_tkapp_createcommand(TkappObject *self, PyObject *const *args, Py_ssize_t nargs)
     345                 :            : {
     346                 :          0 :     PyObject *return_value = NULL;
     347                 :            :     const char *name;
     348                 :            :     PyObject *func;
     349                 :            : 
     350   [ #  #  #  #  :          0 :     if (!_PyArg_CheckPositional("createcommand", nargs, 2, 2)) {
                   #  # ]
     351                 :          0 :         goto exit;
     352                 :            :     }
     353         [ #  # ]:          0 :     if (!PyUnicode_Check(args[0])) {
     354                 :          0 :         _PyArg_BadArgument("createcommand", "argument 1", "str", args[0]);
     355                 :          0 :         goto exit;
     356                 :            :     }
     357                 :            :     Py_ssize_t name_length;
     358                 :          0 :     name = PyUnicode_AsUTF8AndSize(args[0], &name_length);
     359         [ #  # ]:          0 :     if (name == NULL) {
     360                 :          0 :         goto exit;
     361                 :            :     }
     362         [ #  # ]:          0 :     if (strlen(name) != (size_t)name_length) {
     363                 :          0 :         PyErr_SetString(PyExc_ValueError, "embedded null character");
     364                 :          0 :         goto exit;
     365                 :            :     }
     366                 :          0 :     func = args[1];
     367                 :          0 :     return_value = _tkinter_tkapp_createcommand_impl(self, name, func);
     368                 :            : 
     369                 :          0 : exit:
     370                 :          0 :     return return_value;
     371                 :            : }
     372                 :            : 
     373                 :            : PyDoc_STRVAR(_tkinter_tkapp_deletecommand__doc__,
     374                 :            : "deletecommand($self, name, /)\n"
     375                 :            : "--\n"
     376                 :            : "\n");
     377                 :            : 
     378                 :            : #define _TKINTER_TKAPP_DELETECOMMAND_METHODDEF    \
     379                 :            :     {"deletecommand", (PyCFunction)_tkinter_tkapp_deletecommand, METH_O, _tkinter_tkapp_deletecommand__doc__},
     380                 :            : 
     381                 :            : static PyObject *
     382                 :            : _tkinter_tkapp_deletecommand_impl(TkappObject *self, const char *name);
     383                 :            : 
     384                 :            : static PyObject *
     385                 :          0 : _tkinter_tkapp_deletecommand(TkappObject *self, PyObject *arg)
     386                 :            : {
     387                 :          0 :     PyObject *return_value = NULL;
     388                 :            :     const char *name;
     389                 :            : 
     390         [ #  # ]:          0 :     if (!PyUnicode_Check(arg)) {
     391                 :          0 :         _PyArg_BadArgument("deletecommand", "argument", "str", arg);
     392                 :          0 :         goto exit;
     393                 :            :     }
     394                 :            :     Py_ssize_t name_length;
     395                 :          0 :     name = PyUnicode_AsUTF8AndSize(arg, &name_length);
     396         [ #  # ]:          0 :     if (name == NULL) {
     397                 :          0 :         goto exit;
     398                 :            :     }
     399         [ #  # ]:          0 :     if (strlen(name) != (size_t)name_length) {
     400                 :          0 :         PyErr_SetString(PyExc_ValueError, "embedded null character");
     401                 :          0 :         goto exit;
     402                 :            :     }
     403                 :          0 :     return_value = _tkinter_tkapp_deletecommand_impl(self, name);
     404                 :            : 
     405                 :          0 : exit:
     406                 :          0 :     return return_value;
     407                 :            : }
     408                 :            : 
     409                 :            : #if defined(HAVE_CREATEFILEHANDLER)
     410                 :            : 
     411                 :            : PyDoc_STRVAR(_tkinter_tkapp_createfilehandler__doc__,
     412                 :            : "createfilehandler($self, file, mask, func, /)\n"
     413                 :            : "--\n"
     414                 :            : "\n");
     415                 :            : 
     416                 :            : #define _TKINTER_TKAPP_CREATEFILEHANDLER_METHODDEF    \
     417                 :            :     {"createfilehandler", _PyCFunction_CAST(_tkinter_tkapp_createfilehandler), METH_FASTCALL, _tkinter_tkapp_createfilehandler__doc__},
     418                 :            : 
     419                 :            : static PyObject *
     420                 :            : _tkinter_tkapp_createfilehandler_impl(TkappObject *self, PyObject *file,
     421                 :            :                                       int mask, PyObject *func);
     422                 :            : 
     423                 :            : static PyObject *
     424                 :          0 : _tkinter_tkapp_createfilehandler(TkappObject *self, PyObject *const *args, Py_ssize_t nargs)
     425                 :            : {
     426                 :          0 :     PyObject *return_value = NULL;
     427                 :            :     PyObject *file;
     428                 :            :     int mask;
     429                 :            :     PyObject *func;
     430                 :            : 
     431   [ #  #  #  #  :          0 :     if (!_PyArg_CheckPositional("createfilehandler", nargs, 3, 3)) {
                   #  # ]
     432                 :          0 :         goto exit;
     433                 :            :     }
     434                 :          0 :     file = args[0];
     435                 :          0 :     mask = _PyLong_AsInt(args[1]);
     436   [ #  #  #  # ]:          0 :     if (mask == -1 && PyErr_Occurred()) {
     437                 :          0 :         goto exit;
     438                 :            :     }
     439                 :          0 :     func = args[2];
     440                 :          0 :     return_value = _tkinter_tkapp_createfilehandler_impl(self, file, mask, func);
     441                 :            : 
     442                 :          0 : exit:
     443                 :          0 :     return return_value;
     444                 :            : }
     445                 :            : 
     446                 :            : #endif /* defined(HAVE_CREATEFILEHANDLER) */
     447                 :            : 
     448                 :            : #if defined(HAVE_CREATEFILEHANDLER)
     449                 :            : 
     450                 :            : PyDoc_STRVAR(_tkinter_tkapp_deletefilehandler__doc__,
     451                 :            : "deletefilehandler($self, file, /)\n"
     452                 :            : "--\n"
     453                 :            : "\n");
     454                 :            : 
     455                 :            : #define _TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF    \
     456                 :            :     {"deletefilehandler", (PyCFunction)_tkinter_tkapp_deletefilehandler, METH_O, _tkinter_tkapp_deletefilehandler__doc__},
     457                 :            : 
     458                 :            : #endif /* defined(HAVE_CREATEFILEHANDLER) */
     459                 :            : 
     460                 :            : PyDoc_STRVAR(_tkinter_tktimertoken_deletetimerhandler__doc__,
     461                 :            : "deletetimerhandler($self, /)\n"
     462                 :            : "--\n"
     463                 :            : "\n");
     464                 :            : 
     465                 :            : #define _TKINTER_TKTIMERTOKEN_DELETETIMERHANDLER_METHODDEF    \
     466                 :            :     {"deletetimerhandler", (PyCFunction)_tkinter_tktimertoken_deletetimerhandler, METH_NOARGS, _tkinter_tktimertoken_deletetimerhandler__doc__},
     467                 :            : 
     468                 :            : static PyObject *
     469                 :            : _tkinter_tktimertoken_deletetimerhandler_impl(TkttObject *self);
     470                 :            : 
     471                 :            : static PyObject *
     472                 :          0 : _tkinter_tktimertoken_deletetimerhandler(TkttObject *self, PyObject *Py_UNUSED(ignored))
     473                 :            : {
     474                 :          0 :     return _tkinter_tktimertoken_deletetimerhandler_impl(self);
     475                 :            : }
     476                 :            : 
     477                 :            : PyDoc_STRVAR(_tkinter_tkapp_createtimerhandler__doc__,
     478                 :            : "createtimerhandler($self, milliseconds, func, /)\n"
     479                 :            : "--\n"
     480                 :            : "\n");
     481                 :            : 
     482                 :            : #define _TKINTER_TKAPP_CREATETIMERHANDLER_METHODDEF    \
     483                 :            :     {"createtimerhandler", _PyCFunction_CAST(_tkinter_tkapp_createtimerhandler), METH_FASTCALL, _tkinter_tkapp_createtimerhandler__doc__},
     484                 :            : 
     485                 :            : static PyObject *
     486                 :            : _tkinter_tkapp_createtimerhandler_impl(TkappObject *self, int milliseconds,
     487                 :            :                                        PyObject *func);
     488                 :            : 
     489                 :            : static PyObject *
     490                 :          0 : _tkinter_tkapp_createtimerhandler(TkappObject *self, PyObject *const *args, Py_ssize_t nargs)
     491                 :            : {
     492                 :          0 :     PyObject *return_value = NULL;
     493                 :            :     int milliseconds;
     494                 :            :     PyObject *func;
     495                 :            : 
     496   [ #  #  #  #  :          0 :     if (!_PyArg_CheckPositional("createtimerhandler", nargs, 2, 2)) {
                   #  # ]
     497                 :          0 :         goto exit;
     498                 :            :     }
     499                 :          0 :     milliseconds = _PyLong_AsInt(args[0]);
     500   [ #  #  #  # ]:          0 :     if (milliseconds == -1 && PyErr_Occurred()) {
     501                 :          0 :         goto exit;
     502                 :            :     }
     503                 :          0 :     func = args[1];
     504                 :          0 :     return_value = _tkinter_tkapp_createtimerhandler_impl(self, milliseconds, func);
     505                 :            : 
     506                 :          0 : exit:
     507                 :          0 :     return return_value;
     508                 :            : }
     509                 :            : 
     510                 :            : PyDoc_STRVAR(_tkinter_tkapp_mainloop__doc__,
     511                 :            : "mainloop($self, threshold=0, /)\n"
     512                 :            : "--\n"
     513                 :            : "\n");
     514                 :            : 
     515                 :            : #define _TKINTER_TKAPP_MAINLOOP_METHODDEF    \
     516                 :            :     {"mainloop", _PyCFunction_CAST(_tkinter_tkapp_mainloop), METH_FASTCALL, _tkinter_tkapp_mainloop__doc__},
     517                 :            : 
     518                 :            : static PyObject *
     519                 :            : _tkinter_tkapp_mainloop_impl(TkappObject *self, int threshold);
     520                 :            : 
     521                 :            : static PyObject *
     522                 :          0 : _tkinter_tkapp_mainloop(TkappObject *self, PyObject *const *args, Py_ssize_t nargs)
     523                 :            : {
     524                 :          0 :     PyObject *return_value = NULL;
     525                 :          0 :     int threshold = 0;
     526                 :            : 
     527   [ #  #  #  #  :          0 :     if (!_PyArg_CheckPositional("mainloop", nargs, 0, 1)) {
                   #  # ]
     528                 :          0 :         goto exit;
     529                 :            :     }
     530         [ #  # ]:          0 :     if (nargs < 1) {
     531                 :          0 :         goto skip_optional;
     532                 :            :     }
     533                 :          0 :     threshold = _PyLong_AsInt(args[0]);
     534   [ #  #  #  # ]:          0 :     if (threshold == -1 && PyErr_Occurred()) {
     535                 :          0 :         goto exit;
     536                 :            :     }
     537                 :          0 : skip_optional:
     538                 :          0 :     return_value = _tkinter_tkapp_mainloop_impl(self, threshold);
     539                 :            : 
     540                 :          0 : exit:
     541                 :          0 :     return return_value;
     542                 :            : }
     543                 :            : 
     544                 :            : PyDoc_STRVAR(_tkinter_tkapp_dooneevent__doc__,
     545                 :            : "dooneevent($self, flags=0, /)\n"
     546                 :            : "--\n"
     547                 :            : "\n");
     548                 :            : 
     549                 :            : #define _TKINTER_TKAPP_DOONEEVENT_METHODDEF    \
     550                 :            :     {"dooneevent", _PyCFunction_CAST(_tkinter_tkapp_dooneevent), METH_FASTCALL, _tkinter_tkapp_dooneevent__doc__},
     551                 :            : 
     552                 :            : static PyObject *
     553                 :            : _tkinter_tkapp_dooneevent_impl(TkappObject *self, int flags);
     554                 :            : 
     555                 :            : static PyObject *
     556                 :          0 : _tkinter_tkapp_dooneevent(TkappObject *self, PyObject *const *args, Py_ssize_t nargs)
     557                 :            : {
     558                 :          0 :     PyObject *return_value = NULL;
     559                 :          0 :     int flags = 0;
     560                 :            : 
     561   [ #  #  #  #  :          0 :     if (!_PyArg_CheckPositional("dooneevent", nargs, 0, 1)) {
                   #  # ]
     562                 :          0 :         goto exit;
     563                 :            :     }
     564         [ #  # ]:          0 :     if (nargs < 1) {
     565                 :          0 :         goto skip_optional;
     566                 :            :     }
     567                 :          0 :     flags = _PyLong_AsInt(args[0]);
     568   [ #  #  #  # ]:          0 :     if (flags == -1 && PyErr_Occurred()) {
     569                 :          0 :         goto exit;
     570                 :            :     }
     571                 :          0 : skip_optional:
     572                 :          0 :     return_value = _tkinter_tkapp_dooneevent_impl(self, flags);
     573                 :            : 
     574                 :          0 : exit:
     575                 :          0 :     return return_value;
     576                 :            : }
     577                 :            : 
     578                 :            : PyDoc_STRVAR(_tkinter_tkapp_quit__doc__,
     579                 :            : "quit($self, /)\n"
     580                 :            : "--\n"
     581                 :            : "\n");
     582                 :            : 
     583                 :            : #define _TKINTER_TKAPP_QUIT_METHODDEF    \
     584                 :            :     {"quit", (PyCFunction)_tkinter_tkapp_quit, METH_NOARGS, _tkinter_tkapp_quit__doc__},
     585                 :            : 
     586                 :            : static PyObject *
     587                 :            : _tkinter_tkapp_quit_impl(TkappObject *self);
     588                 :            : 
     589                 :            : static PyObject *
     590                 :          0 : _tkinter_tkapp_quit(TkappObject *self, PyObject *Py_UNUSED(ignored))
     591                 :            : {
     592                 :          0 :     return _tkinter_tkapp_quit_impl(self);
     593                 :            : }
     594                 :            : 
     595                 :            : PyDoc_STRVAR(_tkinter_tkapp_interpaddr__doc__,
     596                 :            : "interpaddr($self, /)\n"
     597                 :            : "--\n"
     598                 :            : "\n");
     599                 :            : 
     600                 :            : #define _TKINTER_TKAPP_INTERPADDR_METHODDEF    \
     601                 :            :     {"interpaddr", (PyCFunction)_tkinter_tkapp_interpaddr, METH_NOARGS, _tkinter_tkapp_interpaddr__doc__},
     602                 :            : 
     603                 :            : static PyObject *
     604                 :            : _tkinter_tkapp_interpaddr_impl(TkappObject *self);
     605                 :            : 
     606                 :            : static PyObject *
     607                 :          0 : _tkinter_tkapp_interpaddr(TkappObject *self, PyObject *Py_UNUSED(ignored))
     608                 :            : {
     609                 :          0 :     return _tkinter_tkapp_interpaddr_impl(self);
     610                 :            : }
     611                 :            : 
     612                 :            : PyDoc_STRVAR(_tkinter_tkapp_loadtk__doc__,
     613                 :            : "loadtk($self, /)\n"
     614                 :            : "--\n"
     615                 :            : "\n");
     616                 :            : 
     617                 :            : #define _TKINTER_TKAPP_LOADTK_METHODDEF    \
     618                 :            :     {"loadtk", (PyCFunction)_tkinter_tkapp_loadtk, METH_NOARGS, _tkinter_tkapp_loadtk__doc__},
     619                 :            : 
     620                 :            : static PyObject *
     621                 :            : _tkinter_tkapp_loadtk_impl(TkappObject *self);
     622                 :            : 
     623                 :            : static PyObject *
     624                 :          0 : _tkinter_tkapp_loadtk(TkappObject *self, PyObject *Py_UNUSED(ignored))
     625                 :            : {
     626                 :          0 :     return _tkinter_tkapp_loadtk_impl(self);
     627                 :            : }
     628                 :            : 
     629                 :            : PyDoc_STRVAR(_tkinter_tkapp_willdispatch__doc__,
     630                 :            : "willdispatch($self, /)\n"
     631                 :            : "--\n"
     632                 :            : "\n");
     633                 :            : 
     634                 :            : #define _TKINTER_TKAPP_WILLDISPATCH_METHODDEF    \
     635                 :            :     {"willdispatch", (PyCFunction)_tkinter_tkapp_willdispatch, METH_NOARGS, _tkinter_tkapp_willdispatch__doc__},
     636                 :            : 
     637                 :            : static PyObject *
     638                 :            : _tkinter_tkapp_willdispatch_impl(TkappObject *self);
     639                 :            : 
     640                 :            : static PyObject *
     641                 :          0 : _tkinter_tkapp_willdispatch(TkappObject *self, PyObject *Py_UNUSED(ignored))
     642                 :            : {
     643                 :          0 :     return _tkinter_tkapp_willdispatch_impl(self);
     644                 :            : }
     645                 :            : 
     646                 :            : PyDoc_STRVAR(_tkinter__flatten__doc__,
     647                 :            : "_flatten($module, item, /)\n"
     648                 :            : "--\n"
     649                 :            : "\n");
     650                 :            : 
     651                 :            : #define _TKINTER__FLATTEN_METHODDEF    \
     652                 :            :     {"_flatten", (PyCFunction)_tkinter__flatten, METH_O, _tkinter__flatten__doc__},
     653                 :            : 
     654                 :            : PyDoc_STRVAR(_tkinter_create__doc__,
     655                 :            : "create($module, screenName=None, baseName=\'\', className=\'Tk\',\n"
     656                 :            : "       interactive=False, wantobjects=False, wantTk=True, sync=False,\n"
     657                 :            : "       use=None, /)\n"
     658                 :            : "--\n"
     659                 :            : "\n"
     660                 :            : "\n"
     661                 :            : "\n"
     662                 :            : "  wantTk\n"
     663                 :            : "    if false, then Tk_Init() doesn\'t get called\n"
     664                 :            : "  sync\n"
     665                 :            : "    if true, then pass -sync to wish\n"
     666                 :            : "  use\n"
     667                 :            : "    if not None, then pass -use to wish");
     668                 :            : 
     669                 :            : #define _TKINTER_CREATE_METHODDEF    \
     670                 :            :     {"create", _PyCFunction_CAST(_tkinter_create), METH_FASTCALL, _tkinter_create__doc__},
     671                 :            : 
     672                 :            : static PyObject *
     673                 :            : _tkinter_create_impl(PyObject *module, const char *screenName,
     674                 :            :                      const char *baseName, const char *className,
     675                 :            :                      int interactive, int wantobjects, int wantTk, int sync,
     676                 :            :                      const char *use);
     677                 :            : 
     678                 :            : static PyObject *
     679                 :          0 : _tkinter_create(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
     680                 :            : {
     681                 :          0 :     PyObject *return_value = NULL;
     682                 :          0 :     const char *screenName = NULL;
     683                 :          0 :     const char *baseName = "";
     684                 :          0 :     const char *className = "Tk";
     685                 :          0 :     int interactive = 0;
     686                 :          0 :     int wantobjects = 0;
     687                 :          0 :     int wantTk = 1;
     688                 :          0 :     int sync = 0;
     689                 :          0 :     const char *use = NULL;
     690                 :            : 
     691   [ #  #  #  #  :          0 :     if (!_PyArg_CheckPositional("create", nargs, 0, 8)) {
                   #  # ]
     692                 :          0 :         goto exit;
     693                 :            :     }
     694         [ #  # ]:          0 :     if (nargs < 1) {
     695                 :          0 :         goto skip_optional;
     696                 :            :     }
     697         [ #  # ]:          0 :     if (args[0] == Py_None) {
     698                 :          0 :         screenName = NULL;
     699                 :            :     }
     700         [ #  # ]:          0 :     else if (PyUnicode_Check(args[0])) {
     701                 :            :         Py_ssize_t screenName_length;
     702                 :          0 :         screenName = PyUnicode_AsUTF8AndSize(args[0], &screenName_length);
     703         [ #  # ]:          0 :         if (screenName == NULL) {
     704                 :          0 :             goto exit;
     705                 :            :         }
     706         [ #  # ]:          0 :         if (strlen(screenName) != (size_t)screenName_length) {
     707                 :          0 :             PyErr_SetString(PyExc_ValueError, "embedded null character");
     708                 :          0 :             goto exit;
     709                 :            :         }
     710                 :            :     }
     711                 :            :     else {
     712                 :          0 :         _PyArg_BadArgument("create", "argument 1", "str or None", args[0]);
     713                 :          0 :         goto exit;
     714                 :            :     }
     715         [ #  # ]:          0 :     if (nargs < 2) {
     716                 :          0 :         goto skip_optional;
     717                 :            :     }
     718         [ #  # ]:          0 :     if (!PyUnicode_Check(args[1])) {
     719                 :          0 :         _PyArg_BadArgument("create", "argument 2", "str", args[1]);
     720                 :          0 :         goto exit;
     721                 :            :     }
     722                 :            :     Py_ssize_t baseName_length;
     723                 :          0 :     baseName = PyUnicode_AsUTF8AndSize(args[1], &baseName_length);
     724         [ #  # ]:          0 :     if (baseName == NULL) {
     725                 :          0 :         goto exit;
     726                 :            :     }
     727         [ #  # ]:          0 :     if (strlen(baseName) != (size_t)baseName_length) {
     728                 :          0 :         PyErr_SetString(PyExc_ValueError, "embedded null character");
     729                 :          0 :         goto exit;
     730                 :            :     }
     731         [ #  # ]:          0 :     if (nargs < 3) {
     732                 :          0 :         goto skip_optional;
     733                 :            :     }
     734         [ #  # ]:          0 :     if (!PyUnicode_Check(args[2])) {
     735                 :          0 :         _PyArg_BadArgument("create", "argument 3", "str", args[2]);
     736                 :          0 :         goto exit;
     737                 :            :     }
     738                 :            :     Py_ssize_t className_length;
     739                 :          0 :     className = PyUnicode_AsUTF8AndSize(args[2], &className_length);
     740         [ #  # ]:          0 :     if (className == NULL) {
     741                 :          0 :         goto exit;
     742                 :            :     }
     743         [ #  # ]:          0 :     if (strlen(className) != (size_t)className_length) {
     744                 :          0 :         PyErr_SetString(PyExc_ValueError, "embedded null character");
     745                 :          0 :         goto exit;
     746                 :            :     }
     747         [ #  # ]:          0 :     if (nargs < 4) {
     748                 :          0 :         goto skip_optional;
     749                 :            :     }
     750                 :          0 :     interactive = PyObject_IsTrue(args[3]);
     751         [ #  # ]:          0 :     if (interactive < 0) {
     752                 :          0 :         goto exit;
     753                 :            :     }
     754         [ #  # ]:          0 :     if (nargs < 5) {
     755                 :          0 :         goto skip_optional;
     756                 :            :     }
     757                 :          0 :     wantobjects = PyObject_IsTrue(args[4]);
     758         [ #  # ]:          0 :     if (wantobjects < 0) {
     759                 :          0 :         goto exit;
     760                 :            :     }
     761         [ #  # ]:          0 :     if (nargs < 6) {
     762                 :          0 :         goto skip_optional;
     763                 :            :     }
     764                 :          0 :     wantTk = PyObject_IsTrue(args[5]);
     765         [ #  # ]:          0 :     if (wantTk < 0) {
     766                 :          0 :         goto exit;
     767                 :            :     }
     768         [ #  # ]:          0 :     if (nargs < 7) {
     769                 :          0 :         goto skip_optional;
     770                 :            :     }
     771                 :          0 :     sync = PyObject_IsTrue(args[6]);
     772         [ #  # ]:          0 :     if (sync < 0) {
     773                 :          0 :         goto exit;
     774                 :            :     }
     775         [ #  # ]:          0 :     if (nargs < 8) {
     776                 :          0 :         goto skip_optional;
     777                 :            :     }
     778         [ #  # ]:          0 :     if (args[7] == Py_None) {
     779                 :          0 :         use = NULL;
     780                 :            :     }
     781         [ #  # ]:          0 :     else if (PyUnicode_Check(args[7])) {
     782                 :            :         Py_ssize_t use_length;
     783                 :          0 :         use = PyUnicode_AsUTF8AndSize(args[7], &use_length);
     784         [ #  # ]:          0 :         if (use == NULL) {
     785                 :          0 :             goto exit;
     786                 :            :         }
     787         [ #  # ]:          0 :         if (strlen(use) != (size_t)use_length) {
     788                 :          0 :             PyErr_SetString(PyExc_ValueError, "embedded null character");
     789                 :          0 :             goto exit;
     790                 :            :         }
     791                 :            :     }
     792                 :            :     else {
     793                 :          0 :         _PyArg_BadArgument("create", "argument 8", "str or None", args[7]);
     794                 :          0 :         goto exit;
     795                 :            :     }
     796                 :          0 : skip_optional:
     797                 :          0 :     return_value = _tkinter_create_impl(module, screenName, baseName, className, interactive, wantobjects, wantTk, sync, use);
     798                 :            : 
     799                 :          0 : exit:
     800                 :          0 :     return return_value;
     801                 :            : }
     802                 :            : 
     803                 :            : PyDoc_STRVAR(_tkinter_setbusywaitinterval__doc__,
     804                 :            : "setbusywaitinterval($module, new_val, /)\n"
     805                 :            : "--\n"
     806                 :            : "\n"
     807                 :            : "Set the busy-wait interval in milliseconds between successive calls to Tcl_DoOneEvent in a threaded Python interpreter.\n"
     808                 :            : "\n"
     809                 :            : "It should be set to a divisor of the maximum time between frames in an animation.");
     810                 :            : 
     811                 :            : #define _TKINTER_SETBUSYWAITINTERVAL_METHODDEF    \
     812                 :            :     {"setbusywaitinterval", (PyCFunction)_tkinter_setbusywaitinterval, METH_O, _tkinter_setbusywaitinterval__doc__},
     813                 :            : 
     814                 :            : static PyObject *
     815                 :            : _tkinter_setbusywaitinterval_impl(PyObject *module, int new_val);
     816                 :            : 
     817                 :            : static PyObject *
     818                 :          0 : _tkinter_setbusywaitinterval(PyObject *module, PyObject *arg)
     819                 :            : {
     820                 :          0 :     PyObject *return_value = NULL;
     821                 :            :     int new_val;
     822                 :            : 
     823                 :          0 :     new_val = _PyLong_AsInt(arg);
     824   [ #  #  #  # ]:          0 :     if (new_val == -1 && PyErr_Occurred()) {
     825                 :          0 :         goto exit;
     826                 :            :     }
     827                 :          0 :     return_value = _tkinter_setbusywaitinterval_impl(module, new_val);
     828                 :            : 
     829                 :          0 : exit:
     830                 :          0 :     return return_value;
     831                 :            : }
     832                 :            : 
     833                 :            : PyDoc_STRVAR(_tkinter_getbusywaitinterval__doc__,
     834                 :            : "getbusywaitinterval($module, /)\n"
     835                 :            : "--\n"
     836                 :            : "\n"
     837                 :            : "Return the current busy-wait interval between successive calls to Tcl_DoOneEvent in a threaded Python interpreter.");
     838                 :            : 
     839                 :            : #define _TKINTER_GETBUSYWAITINTERVAL_METHODDEF    \
     840                 :            :     {"getbusywaitinterval", (PyCFunction)_tkinter_getbusywaitinterval, METH_NOARGS, _tkinter_getbusywaitinterval__doc__},
     841                 :            : 
     842                 :            : static int
     843                 :            : _tkinter_getbusywaitinterval_impl(PyObject *module);
     844                 :            : 
     845                 :            : static PyObject *
     846                 :          0 : _tkinter_getbusywaitinterval(PyObject *module, PyObject *Py_UNUSED(ignored))
     847                 :            : {
     848                 :          0 :     PyObject *return_value = NULL;
     849                 :            :     int _return_value;
     850                 :            : 
     851                 :          0 :     _return_value = _tkinter_getbusywaitinterval_impl(module);
     852   [ #  #  #  # ]:          0 :     if ((_return_value == -1) && PyErr_Occurred()) {
     853                 :          0 :         goto exit;
     854                 :            :     }
     855                 :          0 :     return_value = PyLong_FromLong((long)_return_value);
     856                 :            : 
     857                 :          0 : exit:
     858                 :          0 :     return return_value;
     859                 :            : }
     860                 :            : 
     861                 :            : #ifndef _TKINTER_TKAPP_CREATEFILEHANDLER_METHODDEF
     862                 :            :     #define _TKINTER_TKAPP_CREATEFILEHANDLER_METHODDEF
     863                 :            : #endif /* !defined(_TKINTER_TKAPP_CREATEFILEHANDLER_METHODDEF) */
     864                 :            : 
     865                 :            : #ifndef _TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF
     866                 :            :     #define _TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF
     867                 :            : #endif /* !defined(_TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF) */
     868                 :            : /*[clinic end generated code: output=2a4e3bf8448604b5 input=a9049054013a1b77]*/

Generated by: LCOV version 1.14