[Python-Dev] PEP 384: a request for PyType_Slot

Lisandro Dalcin dalcinl at gmail.com
Sat May 23 02:50:33 CEST 2009


Martin, a small request.

Any chance you consider defining PyType_Slot like below?

typedef struct{
  int slot;    /* slot id, see below */
  void *pdata; /* data pointer */
  void (*pfunc)(void); /* function pointer */
} PyType_Slot

Or perhaps other way? Just to avoid compilers complaining about the
illegal conversion between pointers to data and pointers to
functions... It would be really annoying being force to do
type-punning using an union in order to get "correct" C code...

-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594


More information about the Python-Dev mailing list