diff --git a/HISTORY b/HISTORY index 0682c99..d99d6c6 100755 --- a/HISTORY +++ b/HISTORY @@ -26,7 +26,7 @@ May. 24 2017 Fixed a memory leak when applying GC on a forked environment May. 20 2017 -Improved stability by preventing assigning builtin boolean +Improved stability by preventing assigning built-in boolean May. 18 2017 Fixed some memory potential leak when popped unexpected type of argument diff --git a/MY-BASIC Quick Reference.pdf b/MY-BASIC Quick Reference.pdf index 822b310..495e874 100644 Binary files a/MY-BASIC Quick Reference.pdf and b/MY-BASIC Quick Reference.pdf differ diff --git a/core/my_basic.c b/core/my_basic.c index af26112..1c72670 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -11705,21 +11705,21 @@ int mb_get_forked_from(struct mb_interpreter_t* s, struct mb_interpreter_t** src /* Register an API function to a MY-BASIC environment */ int mb_register_func(struct mb_interpreter_t* s, const char* n, mb_func_t f) { - if(!s || !n || !f) return MB_FUNC_ERR; + if(!s || !n || !f) return 0; return _register_func(s, (char*)n, f, false); } /* Remove an API function from a MY-BASIC environment */ int mb_remove_func(struct mb_interpreter_t* s, const char* n) { - if(!s || !n) return MB_FUNC_ERR; + if(!s || !n) return 0; return _remove_func(s, (char*)n, false); } /* Remove a reserved API from a MY-BASIC environment */ int mb_remove_reserved_func(struct mb_interpreter_t* s, const char* n) { - if(!s || !n) return MB_FUNC_ERR; + if(!s || !n) return 0; return _remove_func(s, (char*)n, true); }