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
|
||||
#endif
|
||||
|
||||
/*******************************************************************************/
|
||||
#if PK_ENABLE_STD_FUNCTION
|
||||
#include <functional>
|
||||
#endif
|
||||
/*******************************************************************************/
|
||||
|
||||
#if PK_ENABLE_THREAD
|
||||
|
@ -23,11 +23,11 @@
|
||||
#define PK_GC_MIN_THRESHOLD 16384
|
||||
#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
|
||||
// However, someone thinks it's not convenient.
|
||||
// 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
|
||||
|
||||
/*************** debug settings ***************/
|
||||
|
@ -7,7 +7,7 @@
|
||||
namespace pkpy {
|
||||
|
||||
#if PK_ENABLE_STD_FUNCTION
|
||||
using NativeFuncC = std::function<PyVar(VM*, ArgsView)>;
|
||||
using NativeFuncC = function<PyVar(VM*, ArgsView)>;
|
||||
#else
|
||||
typedef PyVar (*NativeFuncC)(VM*, ArgsView);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user