1
0
Fork 0
forked from fun/fun
Commit graph

7 commits

Author SHA1 Message Date
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
9bba1e34ec Beautified some code in the cgi.fun library. (0.40.8) 2026-04-27 01:55:01 +02:00
3bcdc83e30 Fixed bug in the cgi.fun library. (0.40.7) 2026-04-27 01:31:34 +02:00
5222f79434 Some more HTTP POST evaluation. Still broken! (0.39.10) 2026-03-26 00:36:52 +01:00
3b70d6c92a More CGI Fun. (0.39.7) 2026-03-25 22:44:32 +01:00
db9665f62a Added maps iteration example. (0.39.6). 2026-03-25 21:24:35 +01:00
11d6fd358a Some CGI Fun. (unstable) (0.39.5). 2026-03-25 21:06:15 +01:00