blueloveTH пре 1 година
родитељ
комит
617ff4fc77
3 измењених фајлова са 3 додато и 7 уклоњено
  1. 0 4
      include/pocketpy/common.h
  2. 2 2
      include/pocketpy/config.h
  3. 1 1
      include/pocketpy/obj.h

+ 0 - 4
include/pocketpy/common.h

@@ -38,10 +38,6 @@
 #undef max
 #endif
 
-/*******************************************************************************/
-#if PK_ENABLE_STD_FUNCTION
-#include <functional>
-#endif
 /*******************************************************************************/
 
 #if PK_ENABLE_THREAD

+ 2 - 2
include/pocketpy/config.h

@@ -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 ***************/

+ 1 - 1
include/pocketpy/obj.h

@@ -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