Pynckels left a comment (geany/geany#4250)

utils_replace_placeholder has not the same functionality:

* No %l replacement, because it makes no sense in the context of printing.

Using a routine than can do more than it should do seems an open invitation for 
logic errors. What is the result of the following line when 
build_replace_placeholder() is called within the context of printing?

line_num = sci_get_current_line(doc->editor->sci) + 1;

Using a routine that uses global information (not in the parameter list) to 
change its behavior seems to be kind of a function with side-effect(s).

Concerning allocating a memory block in an other/sub function than where it is 
freed has shown to be very ill advised if one wants to prevent errors, but it 
can be done.

The changes you propose should be done in multiple change requests since they 
would change as well the printing code as the project code. Changing different 
functional codes is not a good idea.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/4250#issuecomment-2776917138
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/4250/c2776917...@github.com>

Reply via email to