This commit is contained in:
blueloveTH 2026-01-05 17:45:05 +08:00
parent 04a5f9069f
commit 68db88b501
2 changed files with 11 additions and 8 deletions

View File

@ -37,9 +37,11 @@ void* c11_deserializer__read_bytes(c11_deserializer* self, int size);
c11_serializer__write_bytes(self, &value, sizeof(T)); \
} \
static inline T c11_deserializer__read_##name(c11_deserializer* self){ \
T* p = (T*)(self->data + self->index); \
const void* p = self->data + self->index; \
self->index += sizeof(T); \
return *p; \
T retval;\
memcpy(&retval, p, sizeof(T)); \
return retval; \
}
DEF_ATOMIC_INLINE_RW(i8, int8_t)

View File

@ -1,13 +1,14 @@
from py_compile import compile
import os
if not os.path.exists('tmp'):
os.mkdir('tmp')
try:
import os
except ImportError:
print('os is not enabled, skipping test...')
exit(0)
compile('python/heapq.py', 'tmp/heapq1.pyc')
assert os.path.exists('tmp/heapq1.pyc')
compile('python/heapq.py', 'heapq1.pyc')
assert os.path.exists('heapq1.pyc')
os.chdir('tmp')
import heapq1
import heapq