cpython/Modules/_struct.c

/* struct module -- pack values into and (out of) bytes objects */

/* New version supporting byte order, alignment and size options,
   character strings, and unsigned numbers */

#ifndef Py_BUILD_CORE_BUILTIN
#define Py_BUILD_CORE_MODULE
#endif

#include "Python.h"
#include "pycore_bytesobject.h"   // _PyBytesWriter
#include "pycore_long.h"          // _PyLong_AsByteArray()
#include "pycore_moduleobject.h"  // _PyModule_GetState()

#ifdef Py_HAVE_C_COMPLEX
#  include "_complex.h"           // complex
#endif
#include <stddef.h>               // offsetof()

/*[clinic input]
class Struct "PyStructObject *" "&PyStructType"
[clinic start generated code]*/
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=9b032058a83ed7c3]*/

_structmodulestate;

static inline _structmodulestate*
get_struct_state(PyObject *module)
{}

static struct PyModuleDef _structmodule;

#define get_struct_state_structinst(self)
#define get_struct_state_iterinst(self)

/* The translation function for each format character is table driven */
formatdef;

formatcode;

/* Struct object interface */

PyStructObject;

#define PyStruct_Check(op, state)

/* Define various structs to figure out the alignments of types */


st_short;
st_int;
st_long;
st_float;
st_double;
#ifdef Py_HAVE_C_COMPLEX
st_float_complex;
st_double_complex;
#endif
st_void_p;
st_size_t;
st_bool;

#define SHORT_ALIGN
#define INT_ALIGN
#define LONG_ALIGN
#define FLOAT_ALIGN
#define DOUBLE_ALIGN
#ifdef Py_HAVE_C_COMPLEX
#define FLOAT_COMPLEX_ALIGN
#define DOUBLE_COMPLEX_ALIGN
#endif
#define VOID_P_ALIGN
#define SIZE_T_ALIGN
#define BOOL_ALIGN

/* We can't support q and Q in native mode unless the compiler does;
   in std mode, they're 8 bytes on all platforms. */
s_long_long;
#define LONG_LONG_ALIGN

#ifdef __powerc
#pragma options align=reset
#endif

/*[python input]
class cache_struct_converter(CConverter):
    type = 'PyStructObject *'
    converter = 'cache_struct_converter'
    c_default = "NULL"
    broken_limited_capi = True

    def parse_arg(self, argname, displayname, *, limited_capi):
        assert not limited_capi
        return self.format_code("""
            if (!{converter}(module, {argname}, &{paramname})) {{{{
                goto exit;
            }}}}
            """,
            argname=argname,
            converter=self.converter)

    def cleanup(self):
        return "Py_XDECREF(%s);\n" % self.name
[python start generated code]*/
/*[python end generated code: output=da39a3ee5e6b4b0d input=c33b27d6b06006c6]*/

static int cache_struct_converter(PyObject *, PyObject *, PyStructObject **);

#include "clinic/_struct.c.h"

/* Helper for integer format codes: converts an arbitrary Python object to a
   PyLongObject if possible, otherwise fails.  Caller should decref. */

static PyObject *
get_pylong(_structmodulestate *state, PyObject *v)
{}

/* Helper routine to get a C long and raise the appropriate error if it isn't
   one */

static int
get_long(_structmodulestate *state, PyObject *v, long *p)
{}


/* Same, but handling unsigned long */

static int
get_ulong(_structmodulestate *state, PyObject *v, unsigned long *p)
{}

/* Same, but handling native long long. */

static int
get_longlong(_structmodulestate *state, PyObject *v, long long *p)
{}

/* Same, but handling native unsigned long long. */

static int
get_ulonglong(_structmodulestate *state, PyObject *v, unsigned long long *p)
{}

/* Same, but handling Py_ssize_t */

static int
get_ssize_t(_structmodulestate *state, PyObject *v, Py_ssize_t *p)
{}

/* Same, but handling size_t */

static int
get_size_t(_structmodulestate *state, PyObject *v, size_t *p)
{}


#define RANGE_ERROR(state, f, flag)


/* Floating-point helpers */

static PyObject *
unpack_halffloat(const char *p,  /* start of 2-byte string */
                 int le)         /* true for little-endian, false for big-endian */
{}

static int
pack_halffloat(_structmodulestate *state,
               char *p,      /* start of 2-byte string */
               PyObject *v,  /* value to pack */
               int le)       /* true for little-endian, false for big-endian */
{}

static PyObject *
unpack_float(const char *p,  /* start of 4-byte string */
         int le)             /* true for little-endian, false for big-endian */
{}

static PyObject *
unpack_double(const char *p,  /* start of 8-byte string */
          int le)         /* true for little-endian, false for big-endian */
{}

/* Helper to format the range error exceptions */
static int
_range_error(_structmodulestate *state, const formatdef *f, int is_unsigned)
{}



/* A large number of small routines follow, with names of the form

   [bln][up]_TYPE

   [bln] distinguishes among big-endian, little-endian and native.
   [pu] distinguishes between pack (to struct) and unpack (from struct).
   TYPE is one of char, byte, ubyte, etc.
*/

/* Native mode routines. ****************************************************/
/* NOTE:
   In all n[up]_<type> routines handling types larger than 1 byte, there is
   *no* guarantee that the p pointer is properly aligned for each type,
   therefore memcpy is called.  An intermediate variable is used to
   compensate for big-endian architectures.
   Normally both the intermediate variable and the memcpy call will be
   skipped by C optimisation in little-endian architectures (gcc >= 2.91
   does this). */

static PyObject *
nu_char(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
nu_byte(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
nu_ubyte(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
nu_short(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
nu_ushort(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
nu_int(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
nu_uint(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
nu_long(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
nu_ulong(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
nu_ssize_t(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
nu_size_t(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
nu_longlong(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
nu_ulonglong(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
nu_bool(_structmodulestate *state, const char *p, const formatdef *f)
{}


static PyObject *
nu_halffloat(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
nu_float(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
nu_double(_structmodulestate *state, const char *p, const formatdef *f)
{}

#ifdef Py_HAVE_C_COMPLEX
static PyObject *
nu_float_complex(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
nu_double_complex(_structmodulestate *state, const char *p, const formatdef *f)
{}
#endif

static PyObject *
nu_void_p(_structmodulestate *state, const char *p, const formatdef *f)
{}

static int
np_byte(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
np_ubyte(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
np_char(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
np_short(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
np_ushort(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
np_int(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
np_uint(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
np_long(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
np_ulong(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
np_ssize_t(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
np_size_t(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
np_longlong(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
np_ulonglong(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}


static int
np_bool(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
np_halffloat(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
np_float(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
np_double(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

#ifdef Py_HAVE_C_COMPLEX
static int
np_float_complex(_structmodulestate *state, char *p, PyObject *v,
                 const formatdef *f)
{}

static int
np_double_complex(_structmodulestate *state, char *p, PyObject *v,
                  const formatdef *f)
{}
#else
static int
np_complex_stub(_structmodulestate *state, char *p, PyObject *v,
                const formatdef *f)
{
    PyErr_Format(state->StructError,
                 "'%c' format not supported on this system",
                 f->format);
    return -1;
}
static PyObject *
nu_complex_stub(_structmodulestate *state, const char *p, const formatdef *f)
{
    PyErr_Format(state->StructError,
                 "'%c' format not supported on this system",
                 f->format);
    return NULL;
}
#endif

static int
np_void_p(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static const formatdef native_table[] =;

/* Big-endian routines. *****************************************************/

static PyObject *
bu_short(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
bu_int(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
bu_uint(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
bu_longlong(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
bu_ulonglong(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
bu_halffloat(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
bu_float(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
bu_double(_structmodulestate *state, const char *p, const formatdef *f)
{}

#ifdef Py_HAVE_C_COMPLEX
static PyObject *
bu_float_complex(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
bu_double_complex(_structmodulestate *state, const char *p, const formatdef *f)
{}
#endif

static PyObject *
bu_bool(_structmodulestate *state, const char *p, const formatdef *f)
{}

static int
bp_int(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
bp_uint(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
bp_longlong(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
bp_ulonglong(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
bp_halffloat(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
bp_float(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
bp_double(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

#ifdef Py_HAVE_C_COMPLEX
static int
bp_float_complex(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
bp_double_complex(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}
#endif

static int
bp_bool(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static formatdef bigendian_table[] =;

/* Little-endian routines. *****************************************************/

static PyObject *
lu_short(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
lu_int(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
lu_uint(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
lu_longlong(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
lu_ulonglong(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
lu_halffloat(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
lu_float(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
lu_double(_structmodulestate *state, const char *p, const formatdef *f)
{}

#ifdef Py_HAVE_C_COMPLEX
static PyObject *
lu_float_complex(_structmodulestate *state, const char *p, const formatdef *f)
{}

static PyObject *
lu_double_complex(_structmodulestate *state, const char *p, const formatdef *f)
{}
#endif

static int
lp_int(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
lp_uint(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
lp_longlong(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
lp_ulonglong(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
lp_halffloat(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
lp_float(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
lp_double(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

#ifdef Py_HAVE_C_COMPLEX
static int
lp_float_complex(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}

static int
lp_double_complex(_structmodulestate *state, char *p, PyObject *v, const formatdef *f)
{}
#endif

static formatdef lilendian_table[] =;


static const formatdef *
whichtable(const char **pfmt)
{}


/* Get the table entry for a format code */

static const formatdef *
getentry(_structmodulestate *state, int c, const formatdef *f)
{}


/* Align a size according to a format code.  Return -1 on overflow. */

static Py_ssize_t
align(Py_ssize_t size, char c, const formatdef *e)
{}

/*
 * Struct object implementation.
 */

/* calculate the size of a format string */

static int
prepare_s(PyStructObject *self)
{}

static PyObject *
s_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{}

/*[clinic input]
Struct.__init__

    format: object

Create a compiled struct object.

Return a new Struct object which writes and reads binary data according to
the format string.

See help(struct) for more on format strings.
[clinic start generated code]*/

static int
Struct___init___impl(PyStructObject *self, PyObject *format)
/*[clinic end generated code: output=b8e80862444e92d0 input=192a4575a3dde802]*/
{}

static int
s_clear(PyStructObject *s)
{}

static int
s_traverse(PyStructObject *s, visitproc visit, void *arg)
{}

static void
s_dealloc(PyStructObject *s)
{}

static PyObject *
s_unpack_internal(PyStructObject *soself, const char *startfrom,
                  _structmodulestate *state) {}


/*[clinic input]
Struct.unpack

    buffer: Py_buffer
    /

Return a tuple containing unpacked values.

Unpack according to the format string Struct.format. The buffer's size
in bytes must be Struct.size.

See help(struct) for more on format strings.
[clinic start generated code]*/

static PyObject *
Struct_unpack_impl(PyStructObject *self, Py_buffer *buffer)
/*[clinic end generated code: output=873a24faf02e848a input=3113f8e7038b2f6c]*/
{}

/*[clinic input]
Struct.unpack_from

    buffer: Py_buffer
    offset: Py_ssize_t = 0

Return a tuple containing unpacked values.

Values are unpacked according to the format string Struct.format.

The buffer's size in bytes, starting at position offset, must be
at least Struct.size.

See help(struct) for more on format strings.
[clinic start generated code]*/

static PyObject *
Struct_unpack_from_impl(PyStructObject *self, Py_buffer *buffer,
                        Py_ssize_t offset)
/*[clinic end generated code: output=57fac875e0977316 input=cafd4851d473c894]*/
{}



/* Unpack iterator type */

unpackiterobject;

static void
unpackiter_dealloc(unpackiterobject *self)
{}

static int
unpackiter_traverse(unpackiterobject *self, visitproc visit, void *arg)
{}

static PyObject *
unpackiter_len(unpackiterobject *self, PyObject *Py_UNUSED(ignored))
{}

static PyMethodDef unpackiter_methods[] =;

static PyObject *
unpackiter_iternext(unpackiterobject *self)
{}

static PyType_Slot unpackiter_type_slots[] =;

static PyType_Spec unpackiter_type_spec =;

/*[clinic input]
Struct.iter_unpack

    buffer: object
    /

Return an iterator yielding tuples.

Tuples are unpacked from the given bytes source, like a repeated
invocation of unpack_from().

Requires that the bytes length be a multiple of the struct size.
[clinic start generated code]*/

static PyObject *
Struct_iter_unpack(PyStructObject *self, PyObject *buffer)
/*[clinic end generated code: output=172d83d0cd15dbab input=6d65b3f3107dbc99]*/
{}


/*
 * Guts of the pack function.
 *
 * Takes a struct object, a tuple of arguments, and offset in that tuple of
 * argument for where to start processing the arguments for packing, and a
 * character buffer for writing the packed string.  The caller must insure
 * that the buffer may contain the required length for packing the arguments.
 * 0 is returned on success, 1 is returned if there is an error.
 *
 */
static int
s_pack_internal(PyStructObject *soself, PyObject *const *args, int offset,
                char* buf, _structmodulestate *state)
{}


PyDoc_STRVAR(s_pack__doc__,
"S.pack(v1, v2, ...) -> bytes\n\
\n\
Return a bytes object containing values v1, v2, ... packed according\n\
to the format string S.format.  See help(struct) for more on format\n\
strings.");

static PyObject *
s_pack(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
{}

PyDoc_STRVAR(s_pack_into__doc__,
"S.pack_into(buffer, offset, v1, v2, ...)\n\
\n\
Pack the values v1, v2, ... according to the format string S.format\n\
and write the packed bytes into the writable buffer buf starting at\n\
offset.  Note that the offset is a required argument.  See\n\
help(struct) for more on format strings.");

static PyObject *
s_pack_into(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
{}

static PyObject *
s_get_format(PyStructObject *self, void *unused)
{}

static PyObject *
s_get_size(PyStructObject *self, void *unused)
{}

PyDoc_STRVAR(s_sizeof__doc__,
"S.__sizeof__() -> size of S in memory, in bytes");

static PyObject *
s_sizeof(PyStructObject *self, void *unused)
{}

static PyObject *
s_repr(PyStructObject *self)
{}

/* List of functions */

static struct PyMethodDef s_methods[] =;

static PyMemberDef s_members[] =;

static PyGetSetDef s_getsetlist[] =;

PyDoc_STRVAR(s__doc__,
"Struct(fmt) --> compiled struct object\n"
"\n"
);

static PyType_Slot PyStructType_slots[] =;

static PyType_Spec PyStructType_spec =;


/* ---- Standalone functions  ---- */

#define MAXCACHE

static int
cache_struct_converter(PyObject *module, PyObject *fmt, PyStructObject **ptr)
{}

/*[clinic input]
_clearcache

Clear the internal cache.
[clinic start generated code]*/

static PyObject *
_clearcache_impl(PyObject *module)
/*[clinic end generated code: output=ce4fb8a7bf7cb523 input=463eaae04bab3211]*/
{}


/*[clinic input]
calcsize -> Py_ssize_t

    format as s_object: cache_struct
    /

Return size in bytes of the struct described by the format string.
[clinic start generated code]*/

static Py_ssize_t
calcsize_impl(PyObject *module, PyStructObject *s_object)
/*[clinic end generated code: output=db7d23d09c6932c4 input=96a6a590c7717ecd]*/
{}

PyDoc_STRVAR(pack_doc,
"pack(format, v1, v2, ...) -> bytes\n\
\n\
Return a bytes object containing the values v1, v2, ... packed according\n\
to the format string.  See help(struct) for more on format strings.");

static PyObject *
pack(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{}

PyDoc_STRVAR(pack_into_doc,
"pack_into(format, buffer, offset, v1, v2, ...)\n\
\n\
Pack the values v1, v2, ... according to the format string and write\n\
the packed bytes into the writable buffer buf starting at offset.  Note\n\
that the offset is a required argument.  See help(struct) for more\n\
on format strings.");

static PyObject *
pack_into(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{}

/*[clinic input]
unpack

    format as s_object: cache_struct
    buffer: Py_buffer
    /

Return a tuple containing values unpacked according to the format string.

The buffer's size in bytes must be calcsize(format).

See help(struct) for more on format strings.
[clinic start generated code]*/

static PyObject *
unpack_impl(PyObject *module, PyStructObject *s_object, Py_buffer *buffer)
/*[clinic end generated code: output=48ddd4d88eca8551 input=05fa3b91678da727]*/
{}

/*[clinic input]
unpack_from

    format as s_object: cache_struct
    /
    buffer: Py_buffer
    offset: Py_ssize_t = 0

Return a tuple containing values unpacked according to the format string.

The buffer's size, minus offset, must be at least calcsize(format).

See help(struct) for more on format strings.
[clinic start generated code]*/

static PyObject *
unpack_from_impl(PyObject *module, PyStructObject *s_object,
                 Py_buffer *buffer, Py_ssize_t offset)
/*[clinic end generated code: output=1042631674c6e0d3 input=6e80a5398e985025]*/
{}

/*[clinic input]
iter_unpack

    format as s_object: cache_struct
    buffer: object
    /

Return an iterator yielding tuples unpacked from the given bytes.

The bytes are unpacked according to the format string, like
a repeated invocation of unpack_from().

Requires that the bytes length be a multiple of the format struct size.
[clinic start generated code]*/

static PyObject *
iter_unpack_impl(PyObject *module, PyStructObject *s_object,
                 PyObject *buffer)
/*[clinic end generated code: output=0ae50e250d20e74d input=b214a58869a3c98d]*/
{}

static struct PyMethodDef module_functions[] =;


/* Module initialization */

PyDoc_STRVAR(module_doc,
"Functions to convert between Python values and C structs.\n\
Python bytes objects are used to hold the data representing the C struct\n\
and also as format strings (explained below) to describe the layout of data\n\
in the C struct.\n\
\n\
The optional first format char indicates byte order, size and alignment:\n\
  @: native order, size & alignment (default)\n\
  =: native order, std. size & alignment\n\
  <: little-endian, std. size & alignment\n\
  >: big-endian, std. size & alignment\n\
  !: same as >\n\
\n\
The remaining chars indicate types of args and must match exactly;\n\
these can be preceded by a decimal repeat count:\n\
  x: pad byte (no data); c:char; b:signed byte; B:unsigned byte;\n\
  ?: _Bool (requires C99; if not available, char is used instead)\n\
  h:short; H:unsigned short; i:int; I:unsigned int;\n\
  l:long; L:unsigned long; f:float; d:double; e:half-float.\n\
Special cases (preceding decimal count indicates length):\n\
  s:string (array of char); p: pascal string (with count byte).\n\
Special cases (only available in native format):\n\
  n:ssize_t; N:size_t;\n\
  P:an integer type that is wide enough to hold a pointer.\n\
Special case (not in native mode unless 'long long' in platform C):\n\
  q:long long; Q:unsigned long long\n\
Whitespace between formats is ignored.\n\
\n\
The variable struct.error is an exception raised on errors.\n");


static int
_structmodule_traverse(PyObject *module, visitproc visit, void *arg)
{}

static int
_structmodule_clear(PyObject *module)
{}

static void
_structmodule_free(void *module)
{}

static int
_structmodule_exec(PyObject *m)
{}

static PyModuleDef_Slot _structmodule_slots[] =;

static struct PyModuleDef _structmodule =;

PyMODINIT_FUNC
PyInit__struct(void)
{}