forked from GitHub/gf-core
the hash function for pgf.Expr is now really added
This commit is contained in:
@@ -150,6 +150,12 @@ Expr_richcompare(ExprObject *e1, ExprObject *e2, int op)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static long
|
||||||
|
Expr_hash(ExprObject *e)
|
||||||
|
{
|
||||||
|
return (long) pgf_expr_hash(0, e->expr);
|
||||||
|
}
|
||||||
|
|
||||||
static PyMethodDef Expr_methods[] = {
|
static PyMethodDef Expr_methods[] = {
|
||||||
{"unpack", (PyCFunction)Expr_unpack, METH_VARARGS,
|
{"unpack", (PyCFunction)Expr_unpack, METH_VARARGS,
|
||||||
"Decomposes an expression into its components"
|
"Decomposes an expression into its components"
|
||||||
@@ -200,7 +206,7 @@ static PyTypeObject pgf_ExprType = {
|
|||||||
0, /*tp_as_number*/
|
0, /*tp_as_number*/
|
||||||
0, /*tp_as_sequence*/
|
0, /*tp_as_sequence*/
|
||||||
0, /*tp_as_mapping*/
|
0, /*tp_as_mapping*/
|
||||||
0, /*tp_hash */
|
(hashfunc) Expr_hash, /*tp_hash */
|
||||||
0, /*tp_call*/
|
0, /*tp_call*/
|
||||||
(reprfunc) Expr_repr, /*tp_str*/
|
(reprfunc) Expr_repr, /*tp_str*/
|
||||||
(getattrofunc) Expr_getattro,/*tp_getattro*/
|
(getattrofunc) Expr_getattro,/*tp_getattro*/
|
||||||
|
|||||||
Reference in New Issue
Block a user