Skip to content

Commit be94c6c

Browse files
committed
run ./preprocess.sh on ./bootstrap
1 parent 9dcfb6b commit be94c6c

File tree

6 files changed

+43
-7
lines changed

6 files changed

+43
-7
lines changed

bootstrap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ test -f ChangeLog || touch ChangeLog
3838
test -f NEWS || touch NEWS
3939
test -f README || touch README
4040

41+
if ! ./preprocess.sh; then
42+
exit 1
43+
fi
4144

4245
ACLOCAL="aclocal"
4346
ACLOCAL_FILES="aclocal.m4"

mpl.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ def args_ref
2222
each_join {|i| "A#{i}& a#{i}" }
2323
end
2424

25+
def args_const_ref
26+
each_join {|i| "const A#{i}& a#{i}" }
27+
end
28+
2529
def types
2630
each_join {|i| "A#{i}" }
2731
end
@@ -34,6 +38,10 @@ def types_ref
3438
each_join {|i| "A#{i}&" }
3539
end
3640

41+
def types_const_ref
42+
each_join {|i| "const A#{i}&" }
43+
end
44+
3745
def params
3846
each_join {|i| "a#{i}" }
3947
end

mpsrc/wavy_kernel_epoll.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,12 @@ class kernel {
223223
}
224224

225225

226-
int add_kernel(kernel* pt)
226+
int add_kernel(kernel* kern)
227227
{
228-
if(add_fd(pt->m_ep, EVKERNEL_READ) < 0) {
228+
if(add_fd(kern->m_ep, EVKERNEL_READ) < 0) {
229229
return -1;
230230
}
231-
return pt->m_ep;
231+
return kern->m_ep;
232232
}
233233

234234
int ident() const

mpsrc/wavy_kernel_kqueue.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,12 @@ class kernel {
248248
}
249249

250250

251-
int add_kernel(kernel* pt)
251+
int add_kernel(kernel* kern)
252252
{
253-
if(add_fd(pt->m_kq, EVKERNEL_READ) < 0) {
253+
if(add_fd(kern->m_kq, EVKERNEL_READ) < 0) {
254254
return -1;
255255
}
256-
return pt->m_kq;
256+
return kern->m_kq;
257257
}
258258

259259
int ident() const

mpsrc/wavy_out.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,6 @@ void loop::hvsendfile(int fd,
586586
}
587587

588588

589-
void kak() { }
590589
} // namespace wavy
591590
} // namespace mp
592591

preprocess.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
3+
RUBY="ruby"
4+
5+
function r() {
6+
echo "$@"
7+
"$@"
8+
}
9+
10+
function preprocess() {
11+
file="$1"
12+
out="$(dirname "$file")/$(basename "$file" mpl)"
13+
r "$RUBY" mplex -rmpl "$file" -o "$out"
14+
if [ "$?" != 0 ]; then
15+
echo ""
16+
echo "** preprocess failed **"
17+
echo ""
18+
exit 1
19+
fi
20+
}
21+
22+
preprocess mp/object_callback.hmpl
23+
preprocess mp/sparse_array.hmpl
24+
preprocess mp/sync.hmpl
25+
preprocess mp/wavy.hmpl
26+

0 commit comments

Comments
 (0)