Re: [freetype2] anuj-distance-field fdf4191: [sdf] Added memory tracker.

2020-07-19 Thread Werner LEMBERG
>> OK. What about passing `__LINE__` then? > > Alright, I have done the relevant changes, to pass > line through a function parameter I had to change > `FT_DEBUG_INNER' and `FT_ASSIGNP_INNER' > macros like this: > ``` > #define FT_DEBUG_INNER( exp ) ( _ft_debug_file = __FILE__, \ >

Re: [freetype2] anuj-distance-field fdf4191: [sdf] Added memory tracker.

2020-07-18 Thread Anuj Verma
> OK. What about passing `__LINE__` then? Alright, I have done the relevant changes, to pass line through a function parameter I had to change `FT_DEBUG_INNER' and `FT_ASSIGNP_INNER' macros like this: ``` #define FT_DEBUG_INNER( exp ) ( _ft_debug_file = __FILE__, \

Re: [freetype2] anuj-distance-field fdf4191: [sdf] Added memory tracker.

2020-07-18 Thread Werner LEMBERG
>> Having two versions would also allow to use a function internally >> so that you can (a) avoid the `do {} while (0)` construction, and >> (b) still use the macro within a conditional. > > I thought about that, but if we create a function then the memory > dump won't print the actual line

Re: [freetype2] anuj-distance-field fdf4191: [sdf] Added memory tracker.

2020-07-18 Thread Anuj Verma
> There should be zero overhead for the non-debugging case. > Having two versions would also allow to use a function internally so > that you can (a) avoid the `do {} while (0)` construction, and (b) > still use the macro within a conditional. I thought about that, but if we create a function

Re: [freetype2] anuj-distance-field fdf4191: [sdf] Added memory tracker.

2020-07-17 Thread Werner LEMBERG
> How is this: > https://lists.nongnu.org/archive/html/freetype-commit/2020-07/msg00067.html > ? Nice! However, I think it's better to have two versions of `SFD_ALLOC` and `SFD_FREE` depending on whether debugging is enabled or not. There should be zero overhead for the non-debugging case.

[freetype2] anuj-distance-field fdf4191: [sdf] Added memory tracker.

2020-07-16 Thread Anuj Verma
Hello Werner, How is this: https://lists.nongnu.org/archive/html/freetype-commit/2020-07/msg00067.html ? Sent from Mail for Windows 10