[Pyrex] Header file/declaration redundancy
bos at serpentine.com
Wed Oct 26 21:58:35 CEST 2005
On Wed, 2005-10-26 at 08:45 -0700, Conrad Steenberg wrote:
> E.g. I have a binding for the tdb database (tdb.sf.net) with code like
> cdef extern from "tdb.h":
> ctypedef enum TDB_ERROR:
> TDB_SUCCESS = 0
> TDB_ERR_CORRUPT = 1
> This seems rather redundant, and even worse, if the tdb declarations
> change slightly, the above needs to be kept up to date manually.
You don't need to declare the values, just the names that you will need
to use. Just as for structs.
More information about the Pyrex