In the process of porting one of my extension functions to the latest GAWK (5.3.2), I noticed that extension functions now take a third arg, whose purpose is unknown (to me, anyway).
What used to be: do_something(nargs, result)
is now: do_something(nargs, result, unused)
But nobody knows what unused is used for. Note that if you compile (as I
do) with -W -Wall -Werror, then you need to add:
(void) unused;
somewhere in the function in order to silence the "unused parameter" warning.
In awk.h and gawkapi.h, this third parameter is referred to as "finfo", but
I can find no other reference to finfo anywhere else.
So, can anyone shed any light on what this third parameter is for, and why
it is called "unused" in some places, and "finfo" in others?
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,064 |
Nodes: | 10 (0 / 10) |
Uptime: | 159:14:30 |
Calls: | 13,691 |
Calls today: | 1 |
Files: | 186,936 |
D/L today: |
7,069 files (2,119M bytes) |
Messages: | 2,411,313 |