Skip to content

Commit

Permalink
Minor fixes (#618)
Browse files Browse the repository at this point in the history
* Prevent double conversion

The size would be converted from int to size_t and then back to int
when calling the function backtrace_symbols_fd().

* Remove deprecated setsockop
  • Loading branch information
IsabelParedes committed Mar 14, 2024
1 parent 49e8185 commit f9f8a05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/xutils.cpp
Expand Up @@ -113,7 +113,7 @@ namespace xpyt
void* array[10];

// get void*'s for all entries on the stack
size_t size = backtrace(array, 10);
int size = backtrace(array, 10);

// print out all the frames to stderr
fprintf(stderr, "Error: signal %d:\n", sig);
Expand Down
4 changes: 2 additions & 2 deletions test/xeus_client.cpp
Expand Up @@ -95,12 +95,12 @@ nl::json xeus_client_base::receive_on_control()

void xeus_client_base::subscribe_iopub(const std::string& filter)
{
m_iopub.setsockopt(ZMQ_SUBSCRIBE, filter.c_str(), filter.length());
m_iopub.set(zmq::sockopt::subscribe, filter);
}

void xeus_client_base::unsubscribe_iopub(const std::string& filter)
{
m_iopub.setsockopt(ZMQ_UNSUBSCRIBE, filter.c_str(), filter.length());
m_iopub.set(zmq::sockopt::unsubscribe, filter);
}

nl::json xeus_client_base::receive_on_iopub()
Expand Down

0 comments on commit f9f8a05

Please sign in to comment.