In the case of the two functions you mention, then `_xavi_list_crt` is hidden
in the c file (being declared static, since it is controlled in very special
cases related transaction states, ...), so if those functions are used outside
of the file, then they still need wrappers to call a common function (for xavp
and xavi) with the adequate list.
And my remark was targeting exactly this case, because the functions have like
10 effective lines of code. A wrapper function is like 3 lines of code, with a
jump on the stack. So overall it is not a significant gain.
It makes sense to have a function for a small number of lines of code, if the
function is used in a lot of places, but if it going to be used in 2-3 places,
then it has to be a significant number of codes of lines to really worth it.
Of course, it can be seen as a personal preference, but I prefer code easier to
follow/search/maintain instead of modularising every snippet of code.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2337#issuecomment-636094675
_______________________________________________
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev