Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix configure_impl function #177

Open
anutosh491 opened this issue Nov 15, 2024 · 0 comments
Open

Fix configure_impl function #177

anutosh491 opened this issue Nov 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@anutosh491
Copy link
Collaborator

anutosh491 commented Nov 15, 2024

The configure_impl function is defined as this

void interpreter::configure_impl()
{
xeus::register_interpreter(this);
}

But xeus doesn't offer a register_interpreter function (it is just a forward declaration used for an internal usecase is what I can see)
https://github.com/jupyter-xeus/xeus/blob/f2084de96255631c77c1fc5a0bc698017f79549e/include/xeus/xinterpreter.hpp#L27

Also this call is required for having xwidgets working, so not sure if this should be done directly or via a string that the interpreter processes (something like what is done in xeus-cling)

    void interpreter::configure_impl()
    {
        // Process #include "xeus/xinterpreter.hpp" in a separate block.
        m_interpreter.process("#include \"xeus/xinterpreter.hpp\"", nullptr, nullptr, true);
        // Expose interpreter instance to cling
        std::string block = "xeus::register_interpreter(static_cast<xeus::xinterpreter*>((void*)"
                            + std::to_string(intptr_t(this)) + "));";
        m_interpreter.process(block.c_str(), nullptr, nullptr, true);
    }
@github-actions github-actions bot added the Needs triage Used in auto labelling of new issues label Nov 15, 2024
@mcbarton mcbarton added bug Something isn't working and removed Needs triage Used in auto labelling of new issues labels Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants