diff options
Diffstat (limited to 'plugins/pychrysalide/analysis/scan/constants.c')
-rw-r--r-- | plugins/pychrysalide/analysis/scan/constants.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/plugins/pychrysalide/analysis/scan/constants.c b/plugins/pychrysalide/analysis/scan/constants.c index 87f3ae8..7ada8d3 100644 --- a/plugins/pychrysalide/analysis/scan/constants.c +++ b/plugins/pychrysalide/analysis/scan/constants.c @@ -51,13 +51,10 @@ bool define_expression_value_type_constants(PyTypeObject *type) values = PyDict_New(); - result = add_const_to_group(values, "BOOLEAN", EVT_BOOLEAN); - if (result) result = add_const_to_group(values, "INTEGER", EVT_INTEGER); - if (result) result = add_const_to_group(values, "STRING", EVT_STRING); - if (result) result = add_const_to_group(values, "REG_EXPR", EVT_REG_EXPR); - if (result) result = add_const_to_group(values, "COUNT", EVT_COUNT); - if (result) result = add_const_to_group(values, "PENDING", EVT_PENDING); - if (result) result = add_const_to_group(values, "UNRESOLVABLE", EVT_UNRESOLVABLE); + result = add_const_to_group(values, "SRS_PENDING", SRS_PENDING); + if (result) result = add_const_to_group(values, "REDUCED", SRS_REDUCED); + if (result) result = add_const_to_group(values, "WAIT_FOR_SCAN", SRS_WAIT_FOR_SCAN); + if (result) result = add_const_to_group(values, "UNRESOLVABLE", SRS_UNRESOLVABLE); if (!result) { @@ -65,8 +62,8 @@ bool define_expression_value_type_constants(PyTypeObject *type) goto exit; } - result = attach_constants_group_to_type(type, false, "ExprValueType", values, - "Natural type equivalent to a given scan expression."); + result = attach_constants_group_to_type(type, false, "ScanReductionState", values, + "State of a scanexpression during the reduction process."); exit: @@ -80,7 +77,7 @@ bool define_expression_value_type_constants(PyTypeObject *type) * Paramètres : arg = argument quelconque à tenter de convertir. * * dst = destination des valeurs récupérées en cas de succès. * * * -* Description : Tente de convertir en constante ExprValueType. * +* Description : Tente de convertir en constante ScanReductionState. * * * * Retour : Bilan de l'opération, voire indications supplémentaires. * * * @@ -88,7 +85,7 @@ bool define_expression_value_type_constants(PyTypeObject *type) * * ******************************************************************************/ -int convert_to_expression_value_type(PyObject *arg, void *dst) +int convert_to_scan_reduction_state(PyObject *arg, void *dst) { int result; /* Bilan à retourner */ unsigned long value; /* Valeur transcrite */ @@ -103,20 +100,20 @@ int convert_to_expression_value_type(PyObject *arg, void *dst) break; case 0: - PyErr_SetString(PyExc_TypeError, "unable to convert the provided argument to ExprValueType"); + PyErr_SetString(PyExc_TypeError, "unable to convert the provided argument to ScanReductionState"); break; case 1: value = PyLong_AsUnsignedLong(arg); - if (value > EVT_COUNT) + if (value > SRS_UNRESOLVABLE) { - PyErr_SetString(PyExc_TypeError, "invalid value for ExprValueType"); + PyErr_SetString(PyExc_TypeError, "invalid value for ScanReductionState"); result = 0; } else - *((ExprValueType *)dst) = value; + *((ScanReductionState *)dst) = value; break; |