diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2023-08-07 00:32:09 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2023-08-07 00:32:09 (GMT) |
commit | 1c5a0e67186def152536d9c506e2e6c3a3a265c5 (patch) | |
tree | a6f0828f39260c7a36a3055bc1b7c1435b8b5d9f /src/analysis/scan/scope.h | |
parent | 293434ab6cb34f1ffb9ed2003a44d7f5aa4450cf (diff) |
Reject any rule referencing itself as match condition
Diffstat (limited to 'src/analysis/scan/scope.h')
-rw-r--r-- | src/analysis/scan/scope.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/analysis/scan/scope.h b/src/analysis/scan/scope.h index 1e5de2c..26b8757 100644 --- a/src/analysis/scan/scope.h +++ b/src/analysis/scan/scope.h @@ -25,12 +25,34 @@ #define _ANALYSIS_SCAN_SCOPE_H +#include <glib-object.h> +#include <stdbool.h> -typedef void *GScanScope; +#define G_TYPE_SCAN_SCOPE g_scan_scope_get_type() +#define G_SCAN_SCOPE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_SCAN_SCOPE, GScanScope)) +#define G_IS_SCAN_SCOPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_SCAN_SCOPE)) +#define G_SCAN_SCOPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_SCAN_SCOPE, GScanScopeClass)) +#define G_IS_SCAN_SCOPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_SCAN_SCOPE)) +#define G_SCAN_SCOPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_SCAN_SCOPE, GScanScopeClass)) +/* Portée locale de variables et règle d'appartenance (instance) */ +typedef struct _GScanScope GScanScope; + +/* Portée locale de variables et règle d'appartenance (classe) */ +typedef struct _GScanScopeClass GScanScopeClass; + + +/* Indique le type défini pour la définition de portée de variables. */ +GType g_scan_scope_get_type(void); + +/* Prépare une définition de portée pour variables. */ +GScanScope *g_scan_scope_new(const char *); + +/* Fournit le nom de la règle d'appartenance. */ +const char *g_scan_scope_get_rule_name(const GScanScope *); |