Mercurial > archived > louis > epitech > mq > rathaxes
view 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 |
line wrap: on
line source
diff --git a/rathaxes/samples/helloworld/hello.rtx b/rathaxes/samples/helloworld/hello.rtx --- a/rathaxes/samples/helloworld/hello.rtx +++ b/rathaxes/samples/helloworld/hello.rtx @@ -1,6 +1,6 @@ device HelloWorld use Main, Types, Log { - Main::start(Main::Arguments args) + Main::main(Main::Arguments args) { Main::log(args); diff --git a/rathaxes/samples/helloworld/log.blt b/rathaxes/samples/helloworld/log.blt --- a/rathaxes/samples/helloworld/log.blt +++ b/rathaxes/samples/helloworld/log.blt @@ -12,5 +12,11 @@ { puts(${msg}); } + + chunk Main::at_exit() + { + fflush(stdout); + fflush(stderr); + } } } diff --git a/rathaxes/samples/helloworld/log.rti b/rathaxes/samples/helloworld/log.rti --- a/rathaxes/samples/helloworld/log.rti +++ b/rathaxes/samples/helloworld/log.rti @@ -3,5 +3,6 @@ provided sequence Log::info(::string) { provided chunk ::CALL; + provided chunk Main::at_exit; } } diff --git a/rathaxes/samples/helloworld/main.blt b/rathaxes/samples/helloworld/main.blt --- a/rathaxes/samples/helloworld/main.blt +++ b/rathaxes/samples/helloworld/main.blt @@ -40,7 +40,7 @@ } } - template sequence Main::start(Main::Arguments args) + template sequence Main::main(Main::Arguments args) { chunk Main::include_headers { @@ -64,6 +64,8 @@ ${args.init(argc, argv, env)}; ${pointcut ::IMPLEMENTATION}; + + ${pointcut Main::at_exit}; } } } diff --git a/rathaxes/samples/helloworld/main.rti b/rathaxes/samples/helloworld/main.rti --- a/rathaxes/samples/helloworld/main.rti +++ b/rathaxes/samples/helloworld/main.rti @@ -6,10 +6,12 @@ provided type Main::Arguments; /* This sequence is required, i.e: its implementation is in the .rtx */ - required sequence Main::start(Main::Arguments) + required sequence Main::main(Main::Arguments) { provided chunk Main::include_headers; provided chunk Main::main; + + provided pointcut Main::at_exit; } /*