shithub: neindaw

Download patch

ref: 8b6e57e4d1f2a7b727e42737c54ea105f1a4af21
parent: 422f8947785adff34c38e4f24396adff0d8ad0d0
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Sat Jan 18 06:50:51 EST 2020

gen: add a dummy field to empty structs (some DSPs are generated with those)

--- a/gen.sh
+++ b/gen.sh
@@ -11,4 +11,6 @@
 	# mark "dsp", "sample_rate", and "inputs" args as USED
 	sed 's/'$class'[A-Z0-9]*\* dsp.*{/&\n\tUSED(dsp);/g' -i "$out"
 	sed 's/ \(sample_rate\|inputs\).*{/&\n\tUSED(\1);/g' -i "$out"
+	# empty structs: add a dummy field
+	sed -z 's/typedef struct {\n\+}/typedef struct {\n      int dummy;\n}/g' -i "$out"
 done