I'm not even a beginner of c language.
and I see the codes from cpython source code:
typedef struct _formatdef {
char format;
Py_ssize_t size;
Py_ssize_t alignment;
PyObject* (*unpack)(_structmodulestate *, const char *,
const struct _formatdef *);
int (*pack)(_structmodulestate *, char *, PyObject *,
const struct _formatdef *);
} formatdef;
in the 5th line, I know that PyObject*
is defining a pointer to a variable of PyObject type, however what does (*unpack)
mean? and what does the following (_structmodulestate *)
mean?