[Github-comments] [geany] Gboxed types (#839)

elextr notifications at xxxxx
Tue Jan 19 10:43:31 UTC 2016


>  */
>  GEANY_API_SYMBOL
>  void tm_source_file_free(TMSourceFile *source_file)
>  {
> -	if (NULL != source_file)

IMHO if its in the API for plugins to use its probably better to be conservative and protect against obvious errors like nulls.  

Things like the `g_return*` series and asserts that can be compiled out are fine for use within an application where there is only a finite usage,and if there are no noisy messages or blow ups after a reasonable test, then its reasonably safe to remove them.

But a plugin API can have a new piece of code using it at any time, so the safety checks should stay.  In an ideal world the whole plugin API should be audited for crash safety, but unless somebody volunteers, then lets just add safety checks as we are changing something in the area and notice it.

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/839/files#r50097336
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160119/dbec9e67/attachment.html>


More information about the Github-comments mailing list