comparison provided_pointcut_in_required_sequences_fail.patch @ 31:cd3e61d6759a

Add a patch to reproduce the issue with pointcut usage in template sequences
author Louis Opter <louis@lse.epitech.net>
date Sat, 07 Jan 2012 21:19:40 +0100
parents
children
comparison
equal deleted inserted replaced
30:b4ca25b88690 31:cd3e61d6759a
1 diff --git a/rathaxes/samples/helloworld/hello.rtx b/rathaxes/samples/helloworld/hello.rtx
2 --- a/rathaxes/samples/helloworld/hello.rtx
3 +++ b/rathaxes/samples/helloworld/hello.rtx
4 @@ -1,6 +1,6 @@
5 device HelloWorld use Main, Types, Log
6 {
7 - Main::start(Main::Arguments args)
8 + Main::main(Main::Arguments args)
9 {
10 Main::log(args);
11
12 diff --git a/rathaxes/samples/helloworld/log.blt b/rathaxes/samples/helloworld/log.blt
13 --- a/rathaxes/samples/helloworld/log.blt
14 +++ b/rathaxes/samples/helloworld/log.blt
15 @@ -12,5 +12,11 @@
16 {
17 puts(${msg});
18 }
19 +
20 + chunk Main::at_exit()
21 + {
22 + fflush(stdout);
23 + fflush(stderr);
24 + }
25 }
26 }
27 diff --git a/rathaxes/samples/helloworld/log.rti b/rathaxes/samples/helloworld/log.rti
28 --- a/rathaxes/samples/helloworld/log.rti
29 +++ b/rathaxes/samples/helloworld/log.rti
30 @@ -3,5 +3,6 @@
31 provided sequence Log::info(::string)
32 {
33 provided chunk ::CALL;
34 + provided chunk Main::at_exit;
35 }
36 }
37 diff --git a/rathaxes/samples/helloworld/main.blt b/rathaxes/samples/helloworld/main.blt
38 --- a/rathaxes/samples/helloworld/main.blt
39 +++ b/rathaxes/samples/helloworld/main.blt
40 @@ -40,7 +40,7 @@
41 }
42 }
43
44 - template sequence Main::start(Main::Arguments args)
45 + template sequence Main::main(Main::Arguments args)
46 {
47 chunk Main::include_headers
48 {
49 @@ -64,6 +64,8 @@
50 ${args.init(argc, argv, env)};
51
52 ${pointcut ::IMPLEMENTATION};
53 +
54 + ${pointcut Main::at_exit};
55 }
56 }
57 }
58 diff --git a/rathaxes/samples/helloworld/main.rti b/rathaxes/samples/helloworld/main.rti
59 --- a/rathaxes/samples/helloworld/main.rti
60 +++ b/rathaxes/samples/helloworld/main.rti
61 @@ -6,10 +6,12 @@
62 provided type Main::Arguments;
63
64 /* This sequence is required, i.e: its implementation is in the .rtx */
65 - required sequence Main::start(Main::Arguments)
66 + required sequence Main::main(Main::Arguments)
67 {
68 provided chunk Main::include_headers;
69 provided chunk Main::main;
70 +
71 + provided pointcut Main::at_exit;
72 }
73
74 /*