LCOV - code coverage report
Current view: top level - Modules/_ssl/clinic - cert.c.h (source / functions) Hit Total Coverage
Test: CPython 3.12 LCOV report [commit 5e6661bce9] Lines: 0 18 0.0 %
Date: 2023-03-20 08:15:36 Functions: 0 2 0.0 %
Branches: 0 18 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(_ssl_Certificate_public_bytes__doc__,
      12                 :            : "public_bytes($self, /, format=Encoding.PEM)\n"
      13                 :            : "--\n"
      14                 :            : "\n");
      15                 :            : 
      16                 :            : #define _SSL_CERTIFICATE_PUBLIC_BYTES_METHODDEF    \
      17                 :            :     {"public_bytes", _PyCFunction_CAST(_ssl_Certificate_public_bytes), METH_FASTCALL|METH_KEYWORDS, _ssl_Certificate_public_bytes__doc__},
      18                 :            : 
      19                 :            : static PyObject *
      20                 :            : _ssl_Certificate_public_bytes_impl(PySSLCertificate *self, int format);
      21                 :            : 
      22                 :            : static PyObject *
      23                 :          0 : _ssl_Certificate_public_bytes(PySSLCertificate *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
      24                 :            : {
      25                 :          0 :     PyObject *return_value = NULL;
      26                 :            :     #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
      27                 :            : 
      28                 :            :     #define NUM_KEYWORDS 1
      29                 :            :     static struct {
      30                 :            :         PyGC_Head _this_is_not_used;
      31                 :            :         PyObject_VAR_HEAD
      32                 :            :         PyObject *ob_item[NUM_KEYWORDS];
      33                 :            :     } _kwtuple = {
      34                 :            :         .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
      35                 :            :         .ob_item = { &_Py_ID(format), },
      36                 :            :     };
      37                 :            :     #undef NUM_KEYWORDS
      38                 :            :     #define KWTUPLE (&_kwtuple.ob_base.ob_base)
      39                 :            : 
      40                 :            :     #else  // !Py_BUILD_CORE
      41                 :            :     #  define KWTUPLE NULL
      42                 :            :     #endif  // !Py_BUILD_CORE
      43                 :            : 
      44                 :            :     static const char * const _keywords[] = {"format", NULL};
      45                 :            :     static _PyArg_Parser _parser = {
      46                 :            :         .keywords = _keywords,
      47                 :            :         .fname = "public_bytes",
      48                 :            :         .kwtuple = KWTUPLE,
      49                 :            :     };
      50                 :            :     #undef KWTUPLE
      51                 :            :     PyObject *argsbuf[1];
      52         [ #  # ]:          0 :     Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
      53                 :          0 :     int format = PY_SSL_ENCODING_PEM;
      54                 :            : 
      55   [ #  #  #  #  :          0 :     args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf);
             #  #  #  # ]
      56         [ #  # ]:          0 :     if (!args) {
      57                 :          0 :         goto exit;
      58                 :            :     }
      59         [ #  # ]:          0 :     if (!noptargs) {
      60                 :          0 :         goto skip_optional_pos;
      61                 :            :     }
      62                 :          0 :     format = _PyLong_AsInt(args[0]);
      63   [ #  #  #  # ]:          0 :     if (format == -1 && PyErr_Occurred()) {
      64                 :          0 :         goto exit;
      65                 :            :     }
      66                 :          0 : skip_optional_pos:
      67                 :          0 :     return_value = _ssl_Certificate_public_bytes_impl(self, format);
      68                 :            : 
      69                 :          0 : exit:
      70                 :          0 :     return return_value;
      71                 :            : }
      72                 :            : 
      73                 :            : PyDoc_STRVAR(_ssl_Certificate_get_info__doc__,
      74                 :            : "get_info($self, /)\n"
      75                 :            : "--\n"
      76                 :            : "\n");
      77                 :            : 
      78                 :            : #define _SSL_CERTIFICATE_GET_INFO_METHODDEF    \
      79                 :            :     {"get_info", (PyCFunction)_ssl_Certificate_get_info, METH_NOARGS, _ssl_Certificate_get_info__doc__},
      80                 :            : 
      81                 :            : static PyObject *
      82                 :            : _ssl_Certificate_get_info_impl(PySSLCertificate *self);
      83                 :            : 
      84                 :            : static PyObject *
      85                 :          0 : _ssl_Certificate_get_info(PySSLCertificate *self, PyObject *Py_UNUSED(ignored))
      86                 :            : {
      87                 :          0 :     return _ssl_Certificate_get_info_impl(self);
      88                 :            : }
      89                 :            : /*[clinic end generated code: output=82efada014f9b7fe input=a9049054013a1b77]*/

Generated by: LCOV version 1.14