summaryrefslogtreecommitdiff
path: root/scripts/maint/add_c_file.py
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-06-14 08:42:24 -0400
committerNick Mathewson <nickm@torproject.org>2019-06-24 17:50:43 -0400
commitc60a85d22ab87fef5a7de2fee616ad112835177b (patch)
tree246892533312b309894449df9760df7cd33a9a3e /scripts/maint/add_c_file.py
parent5a2ab886baaa125fe715acca8f7daf35031855aa (diff)
downloadtor-c60a85d22ab87fef5a7de2fee616ad112835177b.tar.gz
tor-c60a85d22ab87fef5a7de2fee616ad112835177b.zip
Add a "typed_var" abstraction to implement lvalue access in C.
Right now, this has been done at a high level by confparse.c, but it makes more sense to lower it. This API is radically un-typesafe as it stands; we'll be wrapping it in a safer API as we do #30914 and lower the struct manipulation code as well. Closes ticket 30864.
Diffstat (limited to 'scripts/maint/add_c_file.py')
-rwxr-xr-xscripts/maint/add_c_file.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/maint/add_c_file.py b/scripts/maint/add_c_file.py
index 499415974f..adf7ce79bb 100755
--- a/scripts/maint/add_c_file.py
+++ b/scripts/maint/add_c_file.py
@@ -125,8 +125,8 @@ class AutomakeChunk:
Y \
Z
"""
- self.prespace = "\t"
- self.postspace = "\t\t"
+ prespace = "\t"
+ postspace = "\t\t"
for lineno, line in enumerate(self.lines):
m = re.match(r'(\s+)(\S+)(\s+)\\', line)
if not m:
@@ -135,7 +135,7 @@ class AutomakeChunk:
if fname > member:
self.insert_before(lineno, member, prespace, postspace)
return
- self.insert_at_end(member)
+ self.insert_at_end(member, prespace, postspace)
def insert_before(self, lineno, member, prespace, postspace):
self.lines.insert(lineno,