1
0
Fork 0
forked from fun/fun
fun/lib/net
hanez 43ce9f83af parser: fix variable scoping by defaulting to local scope in functions. (0.41.0)
This change addresses a critical issue where common variable names in
library functions (like 'i', 'n', 'src') were being treated as globals
by default, leading to state collisions and unexpected side effects
across different files.

Changes:
- Modified `src/parser.c` to automatically treat new variables assigned
  within a function body as locals unless they were already declared as
  globals.
- Introduced `sym_find` in the parser to distinguish between finding
  an existing global and creating a new one.
- Reverted `lib/net/cgi.fun` to use standard, short variable names,
  confirming that they no longer interfere with the caller's scope.
- Verified that explicit global updates still work if the variable was
  already defined at the top-level scope.
2026-04-27 02:06:20 +02:00
..
cgi.fun parser: fix variable scoping by defaulting to local scope in functions. (0.41.0) 2026-04-27 02:06:20 +02:00
http_cgi_lib_server.fun More CGI Fun. (0.39.7) 2026-03-25 22:44:32 +01:00
http_cgi_server.fun Some more HTTP multi-threading Fun. CGI is broken. (0.39.11) 2026-03-26 22:40:51 +01:00
http_server.fun Added more Fun to htdocs/info.fun. (0.37.33) 2025-12-29 20:39:47 +01:00