Инструменты пользователя

Инструменты сайта


bug_ref_fn

Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

Предыдущая версия справа и слеваПредыдущая версия
Следующая версия
Предыдущая версия
bug_ref_fn [2025/12/15 11:27] snegovickbug_ref_fn [2025/12/15 11:29] (текущий) – [Workaround] snegovick
Строка 86: Строка 86:
 ====== Workaround ====== ====== Workaround ======
  
-Объявление функции в блоке "модуль" помогает решить проблему+Добавление проблемной функции в объявление модуля помогает решить проблему:
- +
-Добавляем empty в декларацию модуля:+
  
 <code> <code>
Строка 98: Строка 96:
 </code> </code>
  
-Lets check libinterp/link.c. The error manifests itself in linkm proc (thats where "link typecheck" message comes from), for some reason <code>empty</code> is in <code>m->ext</code> array (interp.h / struct Module comment calls <code>m->ext</code>: "External dynamic links") and this loop:+Lets check libinterp/link.c. The error manifests itself in linkm proc (thats where "link typecheck" message comes from), for some reason empty is in m->ext array (interp.h / struct Module comment calls m->ext: "External dynamic links") and this loop:
 [ for(l = m->ext; l->name; l++)](https://github.com/inferno-os/inferno-os/blob/d7b29f497205f48247d2bab33340bd7ace64de4d/libinterp/link.c#L41) [ for(l = m->ext; l->name; l++)](https://github.com/inferno-os/inferno-os/blob/d7b29f497205f48247d2bab33340bd7ace64de4d/libinterp/link.c#L41)
-iterates over <code>init<code/> and <code>empty</code>.+iterates over init and empty.
  
-When you add <code>empty</code> to module definition explicitly, then this loop only makes single iteration with <code>init</code>.+When you add empty to module definition explicitly, then this loop only makes single iteration with init.
  
 Limbo does not have anonymous functions (lambdas) as far as I know, so this issue just leads to inconvenience of declaration of functions you normally would prefer not to declare. Limbo does not have anonymous functions (lambdas) as far as I know, so this issue just leads to inconvenience of declaration of functions you normally would prefer not to declare.
bug_ref_fn.1765798052.txt.gz · Последнее изменение: snegovick