Is setting *url = NULL forbidden in the goto-url hook?
Kalle Olavi Niemitalo <[email protected]>
| Newsgroups | gmane.comp.web.links |
|---|---|
| Message-ID | <[email protected]> |
"M. Levinson" <[email protected]> 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. OK, applied. 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 restriction. This contradiction does not hurt the Python interface because replace_with_python_string never sets *dest = NULL. _______________________________________________ elinks-dev mailing list [email protected] http://linuxfromscratch.org/mailman/listinfo/elinks-dev
signature.asc
(application/pgp-signature, 188 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFFprePHm9IGt60eMgRAir/AKCmeuQ4x6He/c+A20uoWxgzszV8lwCaAxvt lSRVdG6CC+hBzQIm6MDJanc= =1XsJ -----END PGP SIGNATURE-----