*polishing.

This commit is contained in:
Wang Renxin 2017-07-19 15:27:52 +08:00
parent df7f9f3885
commit 3784ea5566
3 changed files with 4 additions and 4 deletions

View File

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

Binary file not shown.

View File

@ -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);
}