mirror of https://github.com/python/cpython
Stop generating empty arrays.
This commit is contained in:
parent
59090a7334
commit
8d0701daf1
|
@ -353,10 +353,11 @@ class PyTypesDeclareVisitor(PickleVisitor):
|
||||||
def visitProduct(self, prod, name):
|
def visitProduct(self, prod, name):
|
||||||
self.emit("PyTypeObject *%s_type;" % name, 0)
|
self.emit("PyTypeObject *%s_type;" % name, 0)
|
||||||
self.emit("static PyObject* ast2obj_%s(void*);" % name, 0)
|
self.emit("static PyObject* ast2obj_%s(void*);" % name, 0)
|
||||||
self.emit("char *%s_fields[]={" % name,0)
|
if prod.fields:
|
||||||
for f in prod.fields:
|
self.emit("char *%s_fields[]={" % name,0)
|
||||||
self.emit('"%s",' % f.name, 1)
|
for f in prod.fields:
|
||||||
self.emit("};", 0)
|
self.emit('"%s",' % f.name, 1)
|
||||||
|
self.emit("};", 0)
|
||||||
|
|
||||||
def visitSum(self, sum, name):
|
def visitSum(self, sum, name):
|
||||||
self.emit("PyTypeObject *%s_type;" % name, 0)
|
self.emit("PyTypeObject *%s_type;" % name, 0)
|
||||||
|
@ -374,10 +375,11 @@ class PyTypesDeclareVisitor(PickleVisitor):
|
||||||
|
|
||||||
def visitConstructor(self, cons, name):
|
def visitConstructor(self, cons, name):
|
||||||
self.emit("PyTypeObject *%s_type;" % cons.name, 0)
|
self.emit("PyTypeObject *%s_type;" % cons.name, 0)
|
||||||
self.emit("char *%s_fields[]={" % cons.name, 0)
|
if cons.fields:
|
||||||
for t in cons.fields:
|
self.emit("char *%s_fields[]={" % cons.name, 0)
|
||||||
self.emit('"%s",' % t.name, 1)
|
for t in cons.fields:
|
||||||
self.emit("};",0)
|
self.emit('"%s",' % t.name, 1)
|
||||||
|
self.emit("};",0)
|
||||||
|
|
||||||
class PyTypesVisitor(PickleVisitor):
|
class PyTypesVisitor(PickleVisitor):
|
||||||
|
|
||||||
|
@ -450,8 +452,12 @@ static PyObject* ast2obj_bool(bool b)
|
||||||
self.emit("}", 0)
|
self.emit("}", 0)
|
||||||
|
|
||||||
def visitProduct(self, prod, name):
|
def visitProduct(self, prod, name):
|
||||||
self.emit('%s_type = make_type("%s", &PyBaseObject_Type, %s_fields, %d);' %
|
if prod.fields:
|
||||||
(name, name, name, len(prod.fields)), 1)
|
fields = name.value+"_fields"
|
||||||
|
else:
|
||||||
|
fields = "NULL"
|
||||||
|
self.emit('%s_type = make_type("%s", &PyBaseObject_Type, %s, %d);' %
|
||||||
|
(name, name, fields, len(prod.fields)), 1)
|
||||||
|
|
||||||
def visitSum(self, sum, name):
|
def visitSum(self, sum, name):
|
||||||
self.emit('%s_type = make_type("%s", &PyBaseObject_Type, NULL, 0);' % (name, name), 1)
|
self.emit('%s_type = make_type("%s", &PyBaseObject_Type, NULL, 0);' % (name, name), 1)
|
||||||
|
@ -460,8 +466,12 @@ static PyObject* ast2obj_bool(bool b)
|
||||||
self.visitConstructor(t, name, simple)
|
self.visitConstructor(t, name, simple)
|
||||||
|
|
||||||
def visitConstructor(self, cons, name, simple):
|
def visitConstructor(self, cons, name, simple):
|
||||||
self.emit('%s_type = make_type("%s", %s_type, %s_fields, %d);' %
|
if cons.fields:
|
||||||
(cons.name, cons.name, name, cons.name, len(cons.fields)), 1)
|
fields = cons.name.value+"_fields"
|
||||||
|
else:
|
||||||
|
fields = "NULL"
|
||||||
|
self.emit('%s_type = make_type("%s", %s_type, %s, %d);' %
|
||||||
|
(cons.name, cons.name, name, fields, len(cons.fields)), 1)
|
||||||
if simple:
|
if simple:
|
||||||
self.emit("%s_singleton = PyType_GenericNew(%s_type, NULL, NULL);" %
|
self.emit("%s_singleton = PyType_GenericNew(%s_type, NULL, NULL);" %
|
||||||
(cons.name, cons.name), 1)
|
(cons.name, cons.name), 1)
|
||||||
|
|
|
@ -126,14 +126,8 @@ char *Expr_fields[]={
|
||||||
"value",
|
"value",
|
||||||
};
|
};
|
||||||
PyTypeObject *Pass_type;
|
PyTypeObject *Pass_type;
|
||||||
char *Pass_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *Break_type;
|
PyTypeObject *Break_type;
|
||||||
char *Break_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *Continue_type;
|
PyTypeObject *Continue_type;
|
||||||
char *Continue_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *expr_type;
|
PyTypeObject *expr_type;
|
||||||
static PyObject* ast2obj_expr(void*);
|
static PyObject* ast2obj_expr(void*);
|
||||||
PyTypeObject *BoolOp_type;
|
PyTypeObject *BoolOp_type;
|
||||||
|
@ -234,28 +228,14 @@ static PyObject *Load_singleton, *Store_singleton, *Del_singleton,
|
||||||
*AugLoad_singleton, *AugStore_singleton, *Param_singleton;
|
*AugLoad_singleton, *AugStore_singleton, *Param_singleton;
|
||||||
static PyObject* ast2obj_expr_context(expr_context_ty);
|
static PyObject* ast2obj_expr_context(expr_context_ty);
|
||||||
PyTypeObject *Load_type;
|
PyTypeObject *Load_type;
|
||||||
char *Load_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *Store_type;
|
PyTypeObject *Store_type;
|
||||||
char *Store_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *Del_type;
|
PyTypeObject *Del_type;
|
||||||
char *Del_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *AugLoad_type;
|
PyTypeObject *AugLoad_type;
|
||||||
char *AugLoad_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *AugStore_type;
|
PyTypeObject *AugStore_type;
|
||||||
char *AugStore_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *Param_type;
|
PyTypeObject *Param_type;
|
||||||
char *Param_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *slice_type;
|
PyTypeObject *slice_type;
|
||||||
static PyObject* ast2obj_slice(void*);
|
static PyObject* ast2obj_slice(void*);
|
||||||
PyTypeObject *Ellipsis_type;
|
PyTypeObject *Ellipsis_type;
|
||||||
char *Ellipsis_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *Slice_type;
|
PyTypeObject *Slice_type;
|
||||||
char *Slice_fields[]={
|
char *Slice_fields[]={
|
||||||
"lower",
|
"lower",
|
||||||
|
@ -274,11 +254,7 @@ PyTypeObject *boolop_type;
|
||||||
static PyObject *And_singleton, *Or_singleton;
|
static PyObject *And_singleton, *Or_singleton;
|
||||||
static PyObject* ast2obj_boolop(boolop_ty);
|
static PyObject* ast2obj_boolop(boolop_ty);
|
||||||
PyTypeObject *And_type;
|
PyTypeObject *And_type;
|
||||||
char *And_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *Or_type;
|
PyTypeObject *Or_type;
|
||||||
char *Or_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *operator_type;
|
PyTypeObject *operator_type;
|
||||||
static PyObject *Add_singleton, *Sub_singleton, *Mult_singleton,
|
static PyObject *Add_singleton, *Sub_singleton, *Mult_singleton,
|
||||||
*Div_singleton, *Mod_singleton, *Pow_singleton, *LShift_singleton,
|
*Div_singleton, *Mod_singleton, *Pow_singleton, *LShift_singleton,
|
||||||
|
@ -286,92 +262,40 @@ static PyObject *Add_singleton, *Sub_singleton, *Mult_singleton,
|
||||||
*FloorDiv_singleton;
|
*FloorDiv_singleton;
|
||||||
static PyObject* ast2obj_operator(operator_ty);
|
static PyObject* ast2obj_operator(operator_ty);
|
||||||
PyTypeObject *Add_type;
|
PyTypeObject *Add_type;
|
||||||
char *Add_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *Sub_type;
|
PyTypeObject *Sub_type;
|
||||||
char *Sub_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *Mult_type;
|
PyTypeObject *Mult_type;
|
||||||
char *Mult_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *Div_type;
|
PyTypeObject *Div_type;
|
||||||
char *Div_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *Mod_type;
|
PyTypeObject *Mod_type;
|
||||||
char *Mod_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *Pow_type;
|
PyTypeObject *Pow_type;
|
||||||
char *Pow_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *LShift_type;
|
PyTypeObject *LShift_type;
|
||||||
char *LShift_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *RShift_type;
|
PyTypeObject *RShift_type;
|
||||||
char *RShift_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *BitOr_type;
|
PyTypeObject *BitOr_type;
|
||||||
char *BitOr_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *BitXor_type;
|
PyTypeObject *BitXor_type;
|
||||||
char *BitXor_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *BitAnd_type;
|
PyTypeObject *BitAnd_type;
|
||||||
char *BitAnd_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *FloorDiv_type;
|
PyTypeObject *FloorDiv_type;
|
||||||
char *FloorDiv_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *unaryop_type;
|
PyTypeObject *unaryop_type;
|
||||||
static PyObject *Invert_singleton, *Not_singleton, *UAdd_singleton,
|
static PyObject *Invert_singleton, *Not_singleton, *UAdd_singleton,
|
||||||
*USub_singleton;
|
*USub_singleton;
|
||||||
static PyObject* ast2obj_unaryop(unaryop_ty);
|
static PyObject* ast2obj_unaryop(unaryop_ty);
|
||||||
PyTypeObject *Invert_type;
|
PyTypeObject *Invert_type;
|
||||||
char *Invert_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *Not_type;
|
PyTypeObject *Not_type;
|
||||||
char *Not_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *UAdd_type;
|
PyTypeObject *UAdd_type;
|
||||||
char *UAdd_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *USub_type;
|
PyTypeObject *USub_type;
|
||||||
char *USub_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *cmpop_type;
|
PyTypeObject *cmpop_type;
|
||||||
static PyObject *Eq_singleton, *NotEq_singleton, *Lt_singleton, *LtE_singleton,
|
static PyObject *Eq_singleton, *NotEq_singleton, *Lt_singleton, *LtE_singleton,
|
||||||
*Gt_singleton, *GtE_singleton, *Is_singleton, *IsNot_singleton, *In_singleton,
|
*Gt_singleton, *GtE_singleton, *Is_singleton, *IsNot_singleton, *In_singleton,
|
||||||
*NotIn_singleton;
|
*NotIn_singleton;
|
||||||
static PyObject* ast2obj_cmpop(cmpop_ty);
|
static PyObject* ast2obj_cmpop(cmpop_ty);
|
||||||
PyTypeObject *Eq_type;
|
PyTypeObject *Eq_type;
|
||||||
char *Eq_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *NotEq_type;
|
PyTypeObject *NotEq_type;
|
||||||
char *NotEq_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *Lt_type;
|
PyTypeObject *Lt_type;
|
||||||
char *Lt_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *LtE_type;
|
PyTypeObject *LtE_type;
|
||||||
char *LtE_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *Gt_type;
|
PyTypeObject *Gt_type;
|
||||||
char *Gt_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *GtE_type;
|
PyTypeObject *GtE_type;
|
||||||
char *GtE_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *Is_type;
|
PyTypeObject *Is_type;
|
||||||
char *Is_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *IsNot_type;
|
PyTypeObject *IsNot_type;
|
||||||
char *IsNot_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *In_type;
|
PyTypeObject *In_type;
|
||||||
char *In_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *NotIn_type;
|
PyTypeObject *NotIn_type;
|
||||||
char *NotIn_fields[]={
|
|
||||||
};
|
|
||||||
PyTypeObject *comprehension_type;
|
PyTypeObject *comprehension_type;
|
||||||
static PyObject* ast2obj_comprehension(void*);
|
static PyObject* ast2obj_comprehension(void*);
|
||||||
char *comprehension_fields[]={
|
char *comprehension_fields[]={
|
||||||
|
@ -498,9 +422,9 @@ static int init_types(void)
|
||||||
Exec_type = make_type("Exec", stmt_type, Exec_fields, 3);
|
Exec_type = make_type("Exec", stmt_type, Exec_fields, 3);
|
||||||
Global_type = make_type("Global", stmt_type, Global_fields, 1);
|
Global_type = make_type("Global", stmt_type, Global_fields, 1);
|
||||||
Expr_type = make_type("Expr", stmt_type, Expr_fields, 1);
|
Expr_type = make_type("Expr", stmt_type, Expr_fields, 1);
|
||||||
Pass_type = make_type("Pass", stmt_type, Pass_fields, 0);
|
Pass_type = make_type("Pass", stmt_type, NULL, 0);
|
||||||
Break_type = make_type("Break", stmt_type, Break_fields, 0);
|
Break_type = make_type("Break", stmt_type, NULL, 0);
|
||||||
Continue_type = make_type("Continue", stmt_type, Continue_fields, 0);
|
Continue_type = make_type("Continue", stmt_type, NULL, 0);
|
||||||
expr_type = make_type("expr", &PyBaseObject_Type, NULL, 0);
|
expr_type = make_type("expr", &PyBaseObject_Type, NULL, 0);
|
||||||
BoolOp_type = make_type("BoolOp", expr_type, BoolOp_fields, 2);
|
BoolOp_type = make_type("BoolOp", expr_type, BoolOp_fields, 2);
|
||||||
BinOp_type = make_type("BinOp", expr_type, BinOp_fields, 3);
|
BinOp_type = make_type("BinOp", expr_type, BinOp_fields, 3);
|
||||||
|
@ -523,85 +447,82 @@ static int init_types(void)
|
||||||
Tuple_type = make_type("Tuple", expr_type, Tuple_fields, 2);
|
Tuple_type = make_type("Tuple", expr_type, Tuple_fields, 2);
|
||||||
expr_context_type = make_type("expr_context", &PyBaseObject_Type, NULL,
|
expr_context_type = make_type("expr_context", &PyBaseObject_Type, NULL,
|
||||||
0);
|
0);
|
||||||
Load_type = make_type("Load", expr_context_type, Load_fields, 0);
|
Load_type = make_type("Load", expr_context_type, NULL, 0);
|
||||||
Load_singleton = PyType_GenericNew(Load_type, NULL, NULL);
|
Load_singleton = PyType_GenericNew(Load_type, NULL, NULL);
|
||||||
Store_type = make_type("Store", expr_context_type, Store_fields, 0);
|
Store_type = make_type("Store", expr_context_type, NULL, 0);
|
||||||
Store_singleton = PyType_GenericNew(Store_type, NULL, NULL);
|
Store_singleton = PyType_GenericNew(Store_type, NULL, NULL);
|
||||||
Del_type = make_type("Del", expr_context_type, Del_fields, 0);
|
Del_type = make_type("Del", expr_context_type, NULL, 0);
|
||||||
Del_singleton = PyType_GenericNew(Del_type, NULL, NULL);
|
Del_singleton = PyType_GenericNew(Del_type, NULL, NULL);
|
||||||
AugLoad_type = make_type("AugLoad", expr_context_type, AugLoad_fields,
|
AugLoad_type = make_type("AugLoad", expr_context_type, NULL, 0);
|
||||||
0);
|
|
||||||
AugLoad_singleton = PyType_GenericNew(AugLoad_type, NULL, NULL);
|
AugLoad_singleton = PyType_GenericNew(AugLoad_type, NULL, NULL);
|
||||||
AugStore_type = make_type("AugStore", expr_context_type,
|
AugStore_type = make_type("AugStore", expr_context_type, NULL, 0);
|
||||||
AugStore_fields, 0);
|
|
||||||
AugStore_singleton = PyType_GenericNew(AugStore_type, NULL, NULL);
|
AugStore_singleton = PyType_GenericNew(AugStore_type, NULL, NULL);
|
||||||
Param_type = make_type("Param", expr_context_type, Param_fields, 0);
|
Param_type = make_type("Param", expr_context_type, NULL, 0);
|
||||||
Param_singleton = PyType_GenericNew(Param_type, NULL, NULL);
|
Param_singleton = PyType_GenericNew(Param_type, NULL, NULL);
|
||||||
slice_type = make_type("slice", &PyBaseObject_Type, NULL, 0);
|
slice_type = make_type("slice", &PyBaseObject_Type, NULL, 0);
|
||||||
Ellipsis_type = make_type("Ellipsis", slice_type, Ellipsis_fields, 0);
|
Ellipsis_type = make_type("Ellipsis", slice_type, NULL, 0);
|
||||||
Slice_type = make_type("Slice", slice_type, Slice_fields, 3);
|
Slice_type = make_type("Slice", slice_type, Slice_fields, 3);
|
||||||
ExtSlice_type = make_type("ExtSlice", slice_type, ExtSlice_fields, 1);
|
ExtSlice_type = make_type("ExtSlice", slice_type, ExtSlice_fields, 1);
|
||||||
Index_type = make_type("Index", slice_type, Index_fields, 1);
|
Index_type = make_type("Index", slice_type, Index_fields, 1);
|
||||||
boolop_type = make_type("boolop", &PyBaseObject_Type, NULL, 0);
|
boolop_type = make_type("boolop", &PyBaseObject_Type, NULL, 0);
|
||||||
And_type = make_type("And", boolop_type, And_fields, 0);
|
And_type = make_type("And", boolop_type, NULL, 0);
|
||||||
And_singleton = PyType_GenericNew(And_type, NULL, NULL);
|
And_singleton = PyType_GenericNew(And_type, NULL, NULL);
|
||||||
Or_type = make_type("Or", boolop_type, Or_fields, 0);
|
Or_type = make_type("Or", boolop_type, NULL, 0);
|
||||||
Or_singleton = PyType_GenericNew(Or_type, NULL, NULL);
|
Or_singleton = PyType_GenericNew(Or_type, NULL, NULL);
|
||||||
operator_type = make_type("operator", &PyBaseObject_Type, NULL, 0);
|
operator_type = make_type("operator", &PyBaseObject_Type, NULL, 0);
|
||||||
Add_type = make_type("Add", operator_type, Add_fields, 0);
|
Add_type = make_type("Add", operator_type, NULL, 0);
|
||||||
Add_singleton = PyType_GenericNew(Add_type, NULL, NULL);
|
Add_singleton = PyType_GenericNew(Add_type, NULL, NULL);
|
||||||
Sub_type = make_type("Sub", operator_type, Sub_fields, 0);
|
Sub_type = make_type("Sub", operator_type, NULL, 0);
|
||||||
Sub_singleton = PyType_GenericNew(Sub_type, NULL, NULL);
|
Sub_singleton = PyType_GenericNew(Sub_type, NULL, NULL);
|
||||||
Mult_type = make_type("Mult", operator_type, Mult_fields, 0);
|
Mult_type = make_type("Mult", operator_type, NULL, 0);
|
||||||
Mult_singleton = PyType_GenericNew(Mult_type, NULL, NULL);
|
Mult_singleton = PyType_GenericNew(Mult_type, NULL, NULL);
|
||||||
Div_type = make_type("Div", operator_type, Div_fields, 0);
|
Div_type = make_type("Div", operator_type, NULL, 0);
|
||||||
Div_singleton = PyType_GenericNew(Div_type, NULL, NULL);
|
Div_singleton = PyType_GenericNew(Div_type, NULL, NULL);
|
||||||
Mod_type = make_type("Mod", operator_type, Mod_fields, 0);
|
Mod_type = make_type("Mod", operator_type, NULL, 0);
|
||||||
Mod_singleton = PyType_GenericNew(Mod_type, NULL, NULL);
|
Mod_singleton = PyType_GenericNew(Mod_type, NULL, NULL);
|
||||||
Pow_type = make_type("Pow", operator_type, Pow_fields, 0);
|
Pow_type = make_type("Pow", operator_type, NULL, 0);
|
||||||
Pow_singleton = PyType_GenericNew(Pow_type, NULL, NULL);
|
Pow_singleton = PyType_GenericNew(Pow_type, NULL, NULL);
|
||||||
LShift_type = make_type("LShift", operator_type, LShift_fields, 0);
|
LShift_type = make_type("LShift", operator_type, NULL, 0);
|
||||||
LShift_singleton = PyType_GenericNew(LShift_type, NULL, NULL);
|
LShift_singleton = PyType_GenericNew(LShift_type, NULL, NULL);
|
||||||
RShift_type = make_type("RShift", operator_type, RShift_fields, 0);
|
RShift_type = make_type("RShift", operator_type, NULL, 0);
|
||||||
RShift_singleton = PyType_GenericNew(RShift_type, NULL, NULL);
|
RShift_singleton = PyType_GenericNew(RShift_type, NULL, NULL);
|
||||||
BitOr_type = make_type("BitOr", operator_type, BitOr_fields, 0);
|
BitOr_type = make_type("BitOr", operator_type, NULL, 0);
|
||||||
BitOr_singleton = PyType_GenericNew(BitOr_type, NULL, NULL);
|
BitOr_singleton = PyType_GenericNew(BitOr_type, NULL, NULL);
|
||||||
BitXor_type = make_type("BitXor", operator_type, BitXor_fields, 0);
|
BitXor_type = make_type("BitXor", operator_type, NULL, 0);
|
||||||
BitXor_singleton = PyType_GenericNew(BitXor_type, NULL, NULL);
|
BitXor_singleton = PyType_GenericNew(BitXor_type, NULL, NULL);
|
||||||
BitAnd_type = make_type("BitAnd", operator_type, BitAnd_fields, 0);
|
BitAnd_type = make_type("BitAnd", operator_type, NULL, 0);
|
||||||
BitAnd_singleton = PyType_GenericNew(BitAnd_type, NULL, NULL);
|
BitAnd_singleton = PyType_GenericNew(BitAnd_type, NULL, NULL);
|
||||||
FloorDiv_type = make_type("FloorDiv", operator_type, FloorDiv_fields,
|
FloorDiv_type = make_type("FloorDiv", operator_type, NULL, 0);
|
||||||
0);
|
|
||||||
FloorDiv_singleton = PyType_GenericNew(FloorDiv_type, NULL, NULL);
|
FloorDiv_singleton = PyType_GenericNew(FloorDiv_type, NULL, NULL);
|
||||||
unaryop_type = make_type("unaryop", &PyBaseObject_Type, NULL, 0);
|
unaryop_type = make_type("unaryop", &PyBaseObject_Type, NULL, 0);
|
||||||
Invert_type = make_type("Invert", unaryop_type, Invert_fields, 0);
|
Invert_type = make_type("Invert", unaryop_type, NULL, 0);
|
||||||
Invert_singleton = PyType_GenericNew(Invert_type, NULL, NULL);
|
Invert_singleton = PyType_GenericNew(Invert_type, NULL, NULL);
|
||||||
Not_type = make_type("Not", unaryop_type, Not_fields, 0);
|
Not_type = make_type("Not", unaryop_type, NULL, 0);
|
||||||
Not_singleton = PyType_GenericNew(Not_type, NULL, NULL);
|
Not_singleton = PyType_GenericNew(Not_type, NULL, NULL);
|
||||||
UAdd_type = make_type("UAdd", unaryop_type, UAdd_fields, 0);
|
UAdd_type = make_type("UAdd", unaryop_type, NULL, 0);
|
||||||
UAdd_singleton = PyType_GenericNew(UAdd_type, NULL, NULL);
|
UAdd_singleton = PyType_GenericNew(UAdd_type, NULL, NULL);
|
||||||
USub_type = make_type("USub", unaryop_type, USub_fields, 0);
|
USub_type = make_type("USub", unaryop_type, NULL, 0);
|
||||||
USub_singleton = PyType_GenericNew(USub_type, NULL, NULL);
|
USub_singleton = PyType_GenericNew(USub_type, NULL, NULL);
|
||||||
cmpop_type = make_type("cmpop", &PyBaseObject_Type, NULL, 0);
|
cmpop_type = make_type("cmpop", &PyBaseObject_Type, NULL, 0);
|
||||||
Eq_type = make_type("Eq", cmpop_type, Eq_fields, 0);
|
Eq_type = make_type("Eq", cmpop_type, NULL, 0);
|
||||||
Eq_singleton = PyType_GenericNew(Eq_type, NULL, NULL);
|
Eq_singleton = PyType_GenericNew(Eq_type, NULL, NULL);
|
||||||
NotEq_type = make_type("NotEq", cmpop_type, NotEq_fields, 0);
|
NotEq_type = make_type("NotEq", cmpop_type, NULL, 0);
|
||||||
NotEq_singleton = PyType_GenericNew(NotEq_type, NULL, NULL);
|
NotEq_singleton = PyType_GenericNew(NotEq_type, NULL, NULL);
|
||||||
Lt_type = make_type("Lt", cmpop_type, Lt_fields, 0);
|
Lt_type = make_type("Lt", cmpop_type, NULL, 0);
|
||||||
Lt_singleton = PyType_GenericNew(Lt_type, NULL, NULL);
|
Lt_singleton = PyType_GenericNew(Lt_type, NULL, NULL);
|
||||||
LtE_type = make_type("LtE", cmpop_type, LtE_fields, 0);
|
LtE_type = make_type("LtE", cmpop_type, NULL, 0);
|
||||||
LtE_singleton = PyType_GenericNew(LtE_type, NULL, NULL);
|
LtE_singleton = PyType_GenericNew(LtE_type, NULL, NULL);
|
||||||
Gt_type = make_type("Gt", cmpop_type, Gt_fields, 0);
|
Gt_type = make_type("Gt", cmpop_type, NULL, 0);
|
||||||
Gt_singleton = PyType_GenericNew(Gt_type, NULL, NULL);
|
Gt_singleton = PyType_GenericNew(Gt_type, NULL, NULL);
|
||||||
GtE_type = make_type("GtE", cmpop_type, GtE_fields, 0);
|
GtE_type = make_type("GtE", cmpop_type, NULL, 0);
|
||||||
GtE_singleton = PyType_GenericNew(GtE_type, NULL, NULL);
|
GtE_singleton = PyType_GenericNew(GtE_type, NULL, NULL);
|
||||||
Is_type = make_type("Is", cmpop_type, Is_fields, 0);
|
Is_type = make_type("Is", cmpop_type, NULL, 0);
|
||||||
Is_singleton = PyType_GenericNew(Is_type, NULL, NULL);
|
Is_singleton = PyType_GenericNew(Is_type, NULL, NULL);
|
||||||
IsNot_type = make_type("IsNot", cmpop_type, IsNot_fields, 0);
|
IsNot_type = make_type("IsNot", cmpop_type, NULL, 0);
|
||||||
IsNot_singleton = PyType_GenericNew(IsNot_type, NULL, NULL);
|
IsNot_singleton = PyType_GenericNew(IsNot_type, NULL, NULL);
|
||||||
In_type = make_type("In", cmpop_type, In_fields, 0);
|
In_type = make_type("In", cmpop_type, NULL, 0);
|
||||||
In_singleton = PyType_GenericNew(In_type, NULL, NULL);
|
In_singleton = PyType_GenericNew(In_type, NULL, NULL);
|
||||||
NotIn_type = make_type("NotIn", cmpop_type, NotIn_fields, 0);
|
NotIn_type = make_type("NotIn", cmpop_type, NULL, 0);
|
||||||
NotIn_singleton = PyType_GenericNew(NotIn_type, NULL, NULL);
|
NotIn_singleton = PyType_GenericNew(NotIn_type, NULL, NULL);
|
||||||
comprehension_type = make_type("comprehension", &PyBaseObject_Type,
|
comprehension_type = make_type("comprehension", &PyBaseObject_Type,
|
||||||
comprehension_fields, 3);
|
comprehension_fields, 3);
|
||||||
|
|
Loading…
Reference in New Issue