This commit is contained in:
blueloveTH 2025-06-05 21:12:54 +08:00
parent 9281ebec56
commit 785bb6841e
3 changed files with 7 additions and 3 deletions

View File

@ -3,6 +3,9 @@
#include "pocketpy/pocketpy.h"
#include "http/client/WebSocketClient.h"
extern py_Name __new__;
extern py_Name __init__;
struct libhv_WebSocketClient {
hv::WebSocketClient ws;

View File

@ -62,9 +62,9 @@
// Hash table load factor (smaller ones mean less collision but more memory)
// For class instance
#define PK_INST_ATTR_LOAD_FACTOR 0.67
#define PK_INST_ATTR_LOAD_FACTOR 0.67f
// For class itself
#define PK_TYPE_ATTR_LOAD_FACTOR 0.5
#define PK_TYPE_ATTR_LOAD_FACTOR 0.5f
#ifdef _WIN32
#define PK_PLATFORM_SEP '\\'

View File

@ -217,7 +217,8 @@ static bool ComputeThread__init__(int argc, py_Ref argv) {
static bool ComputeThread_is_done(int argc, py_Ref argv) {
PY_CHECK_ARGC(1);
c11_ComputeThread* self = py_touserdata(argv);
py_newbool(py_retval(), atomic_load(&self->is_done));
bool value = atomic_load(&self->is_done);
py_newbool(py_retval(), value);
return true;
}