@@ -29,21 +29,21 @@ namespace xeus
2929 using function_type = std::function<void (xeus::xcomm&&, const xeus::xmessage&)>;
3030 }
3131
32- nl::json xmock_interpreter::execute_request_impl (int execution_counter ,
33- const std::string& code,
34- bool /* silent */ ,
35- bool /* store_history */ ,
36- nl::json /* user_expressions */ ,
37- bool /* allow_stdin */ )
32+ void xmock_interpreter::execute_request_impl (xrequest_context request_context ,
33+ send_reply_callback cb,
34+ int execution_counter ,
35+ const std::string& code ,
36+ execute_request_config config ,
37+ nl::json /* user_expressions */ )
3838 {
3939 if (code.compare (" hello, world" ) == 0 )
4040 {
41- publish_stream (" stdout" , code);
41+ publish_stream (request_context, " stdout" , code);
4242 }
4343
4444 if (code.compare (" error" ) == 0 )
4545 {
46- publish_stream (" stderr" , code);
46+ publish_stream (request_context, " stderr" , code);
4747 }
4848
4949 if (code.compare (" ?" ) == 0 )
@@ -61,14 +61,16 @@ namespace xeus
6161 {" start" , 0 }
6262 });
6363
64- return xeus::create_successful_reply (payload);
64+ cb (xeus::create_successful_reply (payload));
65+ return ;
6566 }
6667
6768 nl::json pub_data;
6869 pub_data[" text/plain" ] = code;
69- publish_execution_result (execution_counter, std::move (pub_data), nl::json::object ());
70+ publish_execution_result (request_context, execution_counter, std::move (pub_data), nl::json::object ());
7071
71- return xeus::create_successful_reply ();
72+ cb (xeus::create_successful_reply ());
73+ return ;
7274 }
7375
7476 nl::json xmock_interpreter::complete_request_impl (const std::string& /* code */ ,
0 commit comments