Mercurial > hg > Gears > Gears
changeset 628:f464f95b006f
separated output context routine
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 09 Jun 2020 19:46:57 +0900 |
parents | 4fe715132abe |
children | 90309637c4c8 |
files | src/parallel_execution/lib/Gears/Context.pm src/parallel_execution/lib/Gears/Context/Template.pm |
diffstat | 2 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parallel_execution/lib/Gears/Context.pm Tue Jun 09 17:32:59 2020 +0900 +++ b/src/parallel_execution/lib/Gears/Context.pm Tue Jun 09 19:46:57 2020 +0900 @@ -74,6 +74,7 @@ if (%{$from_header_to_caller}) { Gears::Context::Template->emit_include_header($output,$from_header_to_caller); } + Gears::Context::Template->emit_start_context($output); Gears::Context::Template->emit_data_gears($output,$data_struct_str); Gears::Context::Template->emit_last_header($output); close $output;
--- a/src/parallel_execution/lib/Gears/Context/Template.pm Tue Jun 09 17:32:59 2020 +0900 +++ b/src/parallel_execution/lib/Gears/Context/Template.pm Tue Jun 09 19:46:57 2020 +0900 @@ -96,7 +96,13 @@ }; #include "c/enumData.h" +EOFEOF + print $out $str; +} +sub emit_start_context { + my ($class, $out) = @_; +my $str = << 'EOFEOF'; struct Context { enum Code next; struct Worker* worker;