mirror of
https://github.com/pocketpy/pocketpy
synced 2025-11-07 12:10:17 +00:00
Compare commits
3 Commits
601c1029ce
...
76a17ab251
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76a17ab251 | ||
|
|
c044f5dd65 | ||
|
|
a4745a8bd9 |
@ -37,6 +37,8 @@ Please see https://pocketpy.dev for details and try the following resources.
|
||||
pkpy should work on any platform with a C11 compiler.
|
||||
These platforms are officially tested.
|
||||
|
||||
> C99 compilers also work currently according to users' feedback.
|
||||
|
||||
+ Windows 64-bit
|
||||
+ Linux 64-bit / 32-bit
|
||||
+ macOS 64-bit
|
||||
@ -72,7 +74,7 @@ It is safe to use `main` branch in production if CI badge is green.
|
||||
|
||||
To compile it with your project, these flags must be set:
|
||||
|
||||
+ `--std=c11` flag must be set
|
||||
+ `--std=c11` flag must be set (`--std=c99` may also work)
|
||||
+ For MSVC, `/utf-8` flag must be set
|
||||
+ `NDEBUG` macro should be defined for release build, or you will get poor performance
|
||||
|
||||
|
||||
@ -29,9 +29,11 @@ print(primes)
|
||||
|
||||
## Supported platforms
|
||||
|
||||
pkpy should work on any platform with a C++17 compiler.
|
||||
pkpy should work on any platform with a C11 compiler.
|
||||
These platforms are officially tested.
|
||||
|
||||
> C99 compilers also work currently according to users' feedback.
|
||||
|
||||
+ Windows 64-bit
|
||||
+ Linux 64-bit / 32-bit
|
||||
+ macOS 64-bit
|
||||
|
||||
@ -29,7 +29,7 @@ It is safe to use `main` branch in production if CI badge is green.
|
||||
|
||||
To compile it with your project, these flags must be set:
|
||||
|
||||
+ `--std=c11` flag must be set
|
||||
+ `--std=c11` flag must be set (`--std=c99` may also work)
|
||||
+ For MSVC, `/utf-8` flag must be set
|
||||
+ `NDEBUG` macro should be defined for release build, or you will get poor performance
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define PK_REGION(name) 1
|
||||
|
||||
@ -45,6 +44,13 @@ typedef struct RefCounted {
|
||||
do { \
|
||||
if(--(obj)->rc.count == 0) { \
|
||||
(obj)->rc.dtor(obj); \
|
||||
PK_FREE(obj); \
|
||||
PK_FREE(obj); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
// static assert
|
||||
#ifndef __cplusplus
|
||||
#ifndef static_assert
|
||||
#define static_assert(x, msg) if(!(x)) c11__abort("static_assert failed: %s", msg)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user