Staging
v0.5.1
https://github.com/python/cpython
Revision 8f113e915095669062c5a5c186f59b55911ec269 authored by Anthony Baxter on 01 November 2001, 14:43:51 UTC, committed by Anthony Baxter on 01 November 2001, 14:43:51 UTC
  Fix SF bug #474538: Memory (reference) leak in poller.register (Dave Brueck)
  Replace some tortuous code that was trying to be clever but forgot to
  DECREF the key and value, by more longwinded but obviously correct
  code.
1 parent 3688899
Raw File
Tip revision: 8f113e915095669062c5a5c186f59b55911ec269 authored by Anthony Baxter on 01 November 2001, 14:43:51 UTC
backport of 2.58:
Tip revision: 8f113e9
ucnhash.h
/* Unicode name database interface */

#ifndef Py_UCNHASH_H
#define Py_UCNHASH_H
#ifdef __cplusplus
extern "C" {
#endif

/* revised ucnhash CAPI interface (exported through a PyCObject) */

typedef struct {

    /* Size of this struct */
    int size;

    /* Get name for a given character code.  Returns non-zero if
       success, zero if not.  Does not set Python exceptions. */
    int (*getname)(Py_UCS4 code, char* buffer, int buflen);

    /* Get character code for a given name.  Same error handling
       as for getname. */
    int (*getcode)(const char* name, int namelen, Py_UCS4* code);

} _PyUnicode_Name_CAPI;

#ifdef __cplusplus
}
#endif
#endif /* !Py_UCNHASH_H */
back to top