[elinks-dev] Is setting *url = NULL forbidden in the goto-url hook?
Kalle Olavi Niemitalo
kon at iki.fi
Thu Jan 11 14:17:42 PST 2007
"M. Levinson" <levinsm at users.sourceforge.net> writes:
> While writing this, I noticed that the Python API documentation doesn't
> mention the effect of returning an empty string from goto_url_hook or
> follow_url_hook. Here's a trivial patch to remedy that.
While reviewing the patch, I noticed a something odd in the
documentation of goto-url in doc/events.txt:
| If a URL other than @url should be followed, the old one should be freed
| and the new one should be assigned to @url. @url must not be assigned
| NULL and must remain freeable.
| Valid values for @url are:
| - unchanged, if the original URL should be followed;
| - a new, dynamically allocated URL to be followed instead; or
| - NULL or an empty, dynamically allocated string if no URL should be followed.
What can "@url must not be assigned NULL" mean if NULL is
a valid value for @url? The follow-url hook has no such
This contradiction does not hurt the Python interface because
replace_with_python_string never sets *dest = NULL.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 188 bytes
Desc: not available
More information about the elinks-dev