From acca30b423a43d1313b9069c234ef9fac2ac3ea8 Mon Sep 17 00:00:00 2001 From: Sandrine Pataut Date: Fri, 13 Dec 2024 14:07:56 +0100 Subject: [PATCH 1/2] updating context creation in the exemple --- docs/source/example/src/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/source/example/src/main.cpp b/docs/source/example/src/main.cpp index af20c887..29dbf0c4 100644 --- a/docs/source/example/src/main.cpp +++ b/docs/source/example/src/main.cpp @@ -11,7 +11,9 @@ #include "xeus/xkernel.hpp" #include "xeus/xkernel_configuration.hpp" + #include "xeus-zmq/xserver_zmq.hpp" +#include "xeus-zmq/xzmq_context.hpp" #include "custom_interpreter.hpp" @@ -21,7 +23,8 @@ int main(int argc, char* argv[]) std::string file_name = (argc == 1) ? "connection.json" : argv[2]; xeus::xconfiguration config = xeus::load_configuration(file_name); - auto context = xeus::make_context(); + // Create context + std::unique_ptr context = xeus::make_zmq_context(); // Create interpreter instance using interpreter_ptr = std::unique_ptr; From 105530a3f2e4f8cf0a873c93d0cdbe2b3c9658f6 Mon Sep 17 00:00:00 2001 From: Sandrine Pataut Date: Tue, 17 Dec 2024 11:57:54 +0100 Subject: [PATCH 2/2] removing reference to make_xserver_zmq --- docs/source/example/src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/example/src/main.cpp b/docs/source/example/src/main.cpp index 29dbf0c4..64a7c03f 100644 --- a/docs/source/example/src/main.cpp +++ b/docs/source/example/src/main.cpp @@ -31,7 +31,7 @@ int main(int argc, char* argv[]) interpreter_ptr interpreter = interpreter_ptr(new custom::custom_interpreter()); // Create kernel instance and start it - xeus::xkernel kernel(config, xeus::get_user_name(), std::move(context), std::move(interpreter), xeus::make_xserver_zmq); + xeus::xkernel kernel(config, xeus::get_user_name(), std::move(context), std::move(interpreter), xeus::make_xserver_default); kernel.start(); return 0;