summaryrefslogtreecommitdiff
path: root/mesonbuild/modules
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2024-11-01 10:45:12 -0700
committerDylan Baker <dylan@pnwbakers.com>2024-11-15 11:32:50 -0800
commit929df93ba80be347bea5df850ebce280aed64be7 (patch)
treefa783dd5425b47a38c789c9339a797ac0e172e6a /mesonbuild/modules
parentb3f9b9dc06fcd6c0a3070380b42e0ab5fd6c1226 (diff)
downloadmeson-929df93ba80be347bea5df850ebce280aed64be7.tar.gz
interpreter: remove current_lineno
This was only used in a couple of places, and requires extra tracking to ensure it is correct, while we already have `current_node.lineno`, which is always accurate and up to date. I have also fixed a potential strict-null issue by using a sentinel node for `current_node`
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r--mesonbuild/modules/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/modules/__init__.py b/mesonbuild/modules/__init__.py
index 86dc8762e..f9374cc1d 100644
--- a/mesonbuild/modules/__init__.py
+++ b/mesonbuild/modules/__init__.py
@@ -38,7 +38,7 @@ class ModuleState:
self.subproject = interpreter.subproject
self.subdir = interpreter.subdir
self.root_subdir = interpreter.root_subdir
- self.current_lineno = interpreter.current_lineno
+ self.current_lineno = interpreter.current_node.lineno
self.environment = interpreter.environment
self.project_name = interpreter.build.project_name
self.project_version = interpreter.build.dep_manifest[interpreter.active_projectname].version