[Github-comments] [geany] Geany hangs on saving a certain file (reproducible) (#815)

rovf notifications at xxxxx
Wed Dec 16 09:22:03 UTC 2015


You can even stick with only one "save" function and just simulate defaults. Say your function has the signature

    void save(X,Y,Z)

where X, Y and Z are some types, and you would like to simulate 

    void save(X,Y, Z,bool=false)

where setting the bool parameter to true would cause the new behaviour - no popup on failure, but storing the error message in a global variable save_last_error. To do this in C, you would use a variable argument list, i.e.

    void save(X,Y,...)

and use va_arg to scan for the parameters which are present, and deduce the value of the bool from it.


---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/815#issuecomment-165044089
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20151216/7d82fc63/attachment.html>


More information about the Github-comments mailing list