mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
fix all
This commit is contained in:
parent
9281ebec56
commit
785bb6841e
@ -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;
|
||||
|
||||
|
@ -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 '\\'
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user