summaryrefslogtreecommitdiff
path: root/giscanner
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner')
-rw-r--r--giscanner/annotationparser.py4
-rw-r--r--giscanner/ast.py1
-rw-r--r--giscanner/introspectablepass.py2
3 files changed, 5 insertions, 2 deletions
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py
index 267542f9..a6542332 100644
--- a/giscanner/annotationparser.py
+++ b/giscanner/annotationparser.py
@@ -278,10 +278,12 @@ NOT_OPTIONS = [OPT_NOT_NULLABLE]
OPT_SCOPE_ASYNC = 'async'
OPT_SCOPE_CALL = 'call'
OPT_SCOPE_NOTIFIED = 'notified'
+OPT_SCOPE_FOREVER = 'forever'
SCOPE_OPTIONS = [OPT_SCOPE_ASYNC,
OPT_SCOPE_CALL,
- OPT_SCOPE_NOTIFIED]
+ OPT_SCOPE_NOTIFIED,
+ OPT_SCOPE_FOREVER]
# (transfer) annotation options
OPT_TRANSFER_CONTAINER = 'container'
diff --git a/giscanner/ast.py b/giscanner/ast.py
index 9a0d95c7..c296e8c3 100644
--- a/giscanner/ast.py
+++ b/giscanner/ast.py
@@ -363,6 +363,7 @@ PARAM_DIRECTION_INOUT = 'inout'
PARAM_SCOPE_CALL = 'call'
PARAM_SCOPE_ASYNC = 'async'
PARAM_SCOPE_NOTIFIED = 'notified'
+PARAM_SCOPE_FOREVER = 'forever'
PARAM_TRANSFER_NONE = 'none'
PARAM_TRANSFER_CONTAINER = 'container'
diff --git a/giscanner/introspectablepass.py b/giscanner/introspectablepass.py
index e2056b42..bb3580c6 100644
--- a/giscanner/introspectablepass.py
+++ b/giscanner/introspectablepass.py
@@ -102,7 +102,7 @@ class IntrospectablePass(object):
parent,
node,
"Missing (scope) annotation for callback without "
- "GDestroyNotify (valid: %s, %s)" % (ast.PARAM_SCOPE_CALL, ast.PARAM_SCOPE_ASYNC))
+ "GDestroyNotify (valid: %s, %s, %s)" % (ast.PARAM_SCOPE_CALL, ast.PARAM_SCOPE_ASYNC, ast.PARAM_SCOPE_FOREVER))
parent.introspectable = False
return