mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-22 12:30:19 +00:00
some fix
This commit is contained in:
parent
698566a8a7
commit
617ff4fc77
@ -38,10 +38,6 @@
|
|||||||
#undef max
|
#undef max
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*******************************************************************************/
|
|
||||||
#if PK_ENABLE_STD_FUNCTION
|
|
||||||
#include <functional>
|
|
||||||
#endif
|
|
||||||
/*******************************************************************************/
|
/*******************************************************************************/
|
||||||
|
|
||||||
#if PK_ENABLE_THREAD
|
#if PK_ENABLE_THREAD
|
||||||
|
@ -23,11 +23,11 @@
|
|||||||
#define PK_GC_MIN_THRESHOLD 16384
|
#define PK_GC_MIN_THRESHOLD 16384
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Whether to use `std::function` to do bindings or not
|
// Whether to use `pkpy::function<>` to do bindings or not
|
||||||
// By default, functions to be binded must be a C function pointer without capture
|
// By default, functions to be binded must be a C function pointer without capture
|
||||||
// However, someone thinks it's not convenient.
|
// However, someone thinks it's not convenient.
|
||||||
// By setting this to 1, capturing lambdas can be binded,
|
// By setting this to 1, capturing lambdas can be binded,
|
||||||
// but it's slower and may cause severe "code bloat", also needs more time to compile.
|
// but it's slower and may cause "code bloat", it also needs more time to compile.
|
||||||
#define PK_ENABLE_STD_FUNCTION 0
|
#define PK_ENABLE_STD_FUNCTION 0
|
||||||
|
|
||||||
/*************** debug settings ***************/
|
/*************** debug settings ***************/
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
namespace pkpy {
|
namespace pkpy {
|
||||||
|
|
||||||
#if PK_ENABLE_STD_FUNCTION
|
#if PK_ENABLE_STD_FUNCTION
|
||||||
using NativeFuncC = std::function<PyVar(VM*, ArgsView)>;
|
using NativeFuncC = function<PyVar(VM*, ArgsView)>;
|
||||||
#else
|
#else
|
||||||
typedef PyVar (*NativeFuncC)(VM*, ArgsView);
|
typedef PyVar (*NativeFuncC)(VM*, ArgsView);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user