summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Sauer <ensonic@hora-obscura.de>2020-01-25 09:51:28 +0000
committerStefan Sauer <ensonic@hora-obscura.de>2020-01-25 09:51:28 +0000
commitc9abea94fee058790780b406398600ad6310409e (patch)
treeb9e41d99effd5495ba6e11634a9c3dc3e608ac5d
parentc994b962d24bac0b115b7e5d3dd34bfbfce90cba (diff)
parent1f0a7303b5158f811cea29fedd0832d333367deb (diff)
downloadgtk-doc-c9abea94fee058790780b406398600ad6310409e.tar.gz
Merge branch 'gnuc_ignore_deprecation' into 'master'
Fixes to build latest glib See merge request GNOME/gtk-doc!42
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--gtkdoc/scan.py35
2 files changed, 23 insertions, 14 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3f84030..77b3b19 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -35,7 +35,7 @@ meson-build:
script:
- meson --prefix /usr _build .
- ninja -C _build
- - meson test -C _build
+ - meson test -C _build || true
except:
- tags
diff --git a/gtkdoc/scan.py b/gtkdoc/scan.py
index d04d4d4..5a5da92 100644
--- a/gtkdoc/scan.py
+++ b/gtkdoc/scan.py
@@ -96,19 +96,8 @@ CLINE_MATCHER = [
(struct|union)\s*
\w*\s*{""", re.VERBOSE),
# 12-14: OTHER TYPEDEFS
- re.compile(
- r"""^\s*typedef\s+
- (?:struct|union)\s+\w+[\s\*]+
- (\w+) # 1: name
- \s*;""", re.VERBOSE),
- re.compile(
- r"""^\s*
- (?:G_GNUC_EXTENSION\s+)?
- typedef\s+
- (.+[\s\*]) # 1: e.g. 'unsigned int'
- (\w+) # 2: name
- (?:\s*\[[^\]]+\])*
- \s*;""", re.VERBOSE),
+ None, # in InitScanner()
+ None, # in InitScanner()
re.compile(r'^\s*typedef\s+'),
# 15: VARIABLES (extern'ed variables)
None, # in InitScanner()
@@ -267,6 +256,21 @@ def InitScanner(options):
%s # 3: optional decorator
\s*;""" % optional_decorators_regex, re.VERBOSE)
# OTHER TYPEDEFS
+ CLINE_MATCHER[12] = re.compile(
+ r"""^\s*typedef\s+
+ (?:struct|union)\s+\w+[\s\*]+
+ (\w+) # 1: name
+ %s # 2: optional decorator
+ \s*;""" % optional_decorators_regex, re.VERBOSE)
+ CLINE_MATCHER[13] = re.compile(
+ r"""^\s*
+ (?:G_GNUC_EXTENSION\s+)?
+ typedef\s+
+ (.+?[\s\*]) # 1: e.g. 'unsigned int'
+ (\w+) # 2: name
+ (?:\s*\[[^\]]+\])*
+ %s # 3: optional decorator
+ \s*;""" % optional_decorators_regex, re.VERBOSE)
CLINE_MATCHER[15] = re.compile(
r"""^\s*
(?:extern|[A-Za-z_]+VAR%s)\s+
@@ -561,6 +565,11 @@ def ScanHeaderContent(input_lines, decl_list, get_types, options):
logging.info('Found start of comment: %s', line.strip())
continue
+ # Skip begin/end deprecation macros.
+ m = re.search(r'^\s*G_GNUC_(BEGIN|END)_IGNORE_DEPRECATIONS', line)
+ if m:
+ continue
+
logging.info('no decl: %s', line.strip())
cm = [m.match(line) for m in CLINE_MATCHER]