*polished.
This commit is contained in:
parent
543c73896d
commit
2349923a9b
@ -202,7 +202,7 @@ The [MY-BASIC Quick Reference](https://paladin-t.github.io/my_basic/MY-BASIC%20Q
|
|||||||
|
|
||||||
## Support MY-BASIC development/List of donors
|
## Support MY-BASIC development/List of donors
|
||||||
|
|
||||||
I need your supports to keep this project alive. Please consider supporting MY-BASIC development with a donation, if it's useful for you.
|
I need your supports to keep this project alive. Consider supporting MY-BASIC development with a donation, if it's useful for you.
|
||||||
|
|
||||||
One-off [donation](http://paladin-t.github.io/my_basic/donate.html) via PayPal.
|
One-off [donation](http://paladin-t.github.io/my_basic/donate.html) via PayPal.
|
||||||
|
|
||||||
|
@ -11932,7 +11932,8 @@ _exit:
|
|||||||
int mb_pop_int(struct mb_interpreter_t* s, void** l, int_t* val) {
|
int mb_pop_int(struct mb_interpreter_t* s, void** l, int_t* val) {
|
||||||
int result = MB_FUNC_OK;
|
int result = MB_FUNC_OK;
|
||||||
mb_value_t arg;
|
mb_value_t arg;
|
||||||
int_t tmp = 0;
|
|
||||||
|
if(val) *val = 0;
|
||||||
|
|
||||||
if(!s || !l || !val) {
|
if(!s || !l || !val) {
|
||||||
result = MB_FUNC_ERR;
|
result = MB_FUNC_ERR;
|
||||||
@ -11946,11 +11947,11 @@ int mb_pop_int(struct mb_interpreter_t* s, void** l, int_t* val) {
|
|||||||
|
|
||||||
switch(arg.type) {
|
switch(arg.type) {
|
||||||
case MB_DT_INT:
|
case MB_DT_INT:
|
||||||
tmp = arg.value.integer;
|
*val = arg.value.integer;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case MB_DT_REAL:
|
case MB_DT_REAL:
|
||||||
tmp = (int_t)(arg.value.float_point);
|
*val = (int_t)(arg.value.float_point);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -11960,8 +11961,6 @@ int mb_pop_int(struct mb_interpreter_t* s, void** l, int_t* val) {
|
|||||||
goto _exit;
|
goto _exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
*val = tmp;
|
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -11970,7 +11969,8 @@ _exit:
|
|||||||
int mb_pop_real(struct mb_interpreter_t* s, void** l, real_t* val) {
|
int mb_pop_real(struct mb_interpreter_t* s, void** l, real_t* val) {
|
||||||
int result = MB_FUNC_OK;
|
int result = MB_FUNC_OK;
|
||||||
mb_value_t arg;
|
mb_value_t arg;
|
||||||
real_t tmp = 0;
|
|
||||||
|
if(val) *val = 0;
|
||||||
|
|
||||||
if(!s || !l || !val) {
|
if(!s || !l || !val) {
|
||||||
result = MB_FUNC_ERR;
|
result = MB_FUNC_ERR;
|
||||||
@ -11984,11 +11984,11 @@ int mb_pop_real(struct mb_interpreter_t* s, void** l, real_t* val) {
|
|||||||
|
|
||||||
switch(arg.type) {
|
switch(arg.type) {
|
||||||
case MB_DT_INT:
|
case MB_DT_INT:
|
||||||
tmp = (real_t)(arg.value.integer);
|
*val = (real_t)(arg.value.integer);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case MB_DT_REAL:
|
case MB_DT_REAL:
|
||||||
tmp = arg.value.float_point;
|
*val = arg.value.float_point;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -11998,8 +11998,6 @@ int mb_pop_real(struct mb_interpreter_t* s, void** l, real_t* val) {
|
|||||||
goto _exit;
|
goto _exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
*val = tmp;
|
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -12008,7 +12006,8 @@ _exit:
|
|||||||
int mb_pop_string(struct mb_interpreter_t* s, void** l, char** val) {
|
int mb_pop_string(struct mb_interpreter_t* s, void** l, char** val) {
|
||||||
int result = MB_FUNC_OK;
|
int result = MB_FUNC_OK;
|
||||||
mb_value_t arg;
|
mb_value_t arg;
|
||||||
char* tmp = 0;
|
|
||||||
|
if(val) *val = 0;
|
||||||
|
|
||||||
if(!s || !l || !val) {
|
if(!s || !l || !val) {
|
||||||
result = MB_FUNC_ERR;
|
result = MB_FUNC_ERR;
|
||||||
@ -12022,7 +12021,7 @@ int mb_pop_string(struct mb_interpreter_t* s, void** l, char** val) {
|
|||||||
|
|
||||||
switch(arg.type) {
|
switch(arg.type) {
|
||||||
case MB_DT_STRING:
|
case MB_DT_STRING:
|
||||||
tmp = arg.value.string;
|
*val = arg.value.string;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -12032,8 +12031,6 @@ int mb_pop_string(struct mb_interpreter_t* s, void** l, char** val) {
|
|||||||
goto _exit;
|
goto _exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
*val = tmp;
|
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -12042,7 +12039,8 @@ _exit:
|
|||||||
int mb_pop_usertype(struct mb_interpreter_t* s, void** l, void** val) {
|
int mb_pop_usertype(struct mb_interpreter_t* s, void** l, void** val) {
|
||||||
int result = MB_FUNC_OK;
|
int result = MB_FUNC_OK;
|
||||||
mb_value_t arg;
|
mb_value_t arg;
|
||||||
void* tmp = 0;
|
|
||||||
|
if(val) *val = 0;
|
||||||
|
|
||||||
if(!s || !l || !val) {
|
if(!s || !l || !val) {
|
||||||
result = MB_FUNC_ERR;
|
result = MB_FUNC_ERR;
|
||||||
@ -12056,7 +12054,7 @@ int mb_pop_usertype(struct mb_interpreter_t* s, void** l, void** val) {
|
|||||||
|
|
||||||
switch(arg.type) {
|
switch(arg.type) {
|
||||||
case MB_DT_USERTYPE:
|
case MB_DT_USERTYPE:
|
||||||
tmp = arg.value.usertype;
|
*val = arg.value.usertype;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -12066,8 +12064,6 @@ int mb_pop_usertype(struct mb_interpreter_t* s, void** l, void** val) {
|
|||||||
goto _exit;
|
goto _exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
*val = tmp;
|
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user