*improved importing directory detection.
This commit is contained in:
parent
a9e7245be1
commit
9cad7c6992
1
HISTORY
1
HISTORY
@ -1,4 +1,5 @@
|
||||
Feb. 25 2016
|
||||
Improved importing directory detection
|
||||
Fixed a bug with the END and RETURN statement with FOR loop
|
||||
Fixed an array index calculation bug
|
||||
|
||||
|
@ -4672,8 +4672,12 @@ static _data_e _get_symbol_type(mb_interpreter_t* s, char* sym, _raw_t* value) {
|
||||
_post_import(s, lf, &pos, &row, &col);
|
||||
}
|
||||
} else {
|
||||
if(!s->import_handler || s->import_handler(s, sym + 1) != MB_FUNC_OK) {
|
||||
_handle_error_now(s, SE_PS_FILE_OPEN_FAILED, s->source_file, MB_FUNC_ERR);
|
||||
if(!_ls_find(context->imported, (void*)(sym + 1), (_ls_compare)_ht_cmp_string, 0)) {
|
||||
if(s->import_handler && s->import_handler(s, sym + 1) == MB_FUNC_OK) {
|
||||
_ls_pushback(context->imported, mb_strdup(sym + 1, strlen(sym + 1) + 1));
|
||||
} else {
|
||||
_handle_error_now(s, SE_PS_FILE_OPEN_FAILED, s->source_file, MB_FUNC_ERR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user