[Geany-Devel] On document pointer recycling

Lex Trotman elextr at xxxxx
Thu Oct 24 10:53:35 UTC 2013


On 24 October 2013 20:48, Thomas Martitz <
thomas.martitz at student.htw-berlin.de> wrote:

> Am 24.10.2013 11:24, schrieb Lex Trotman:
>
>
>> I currently do not have access to a dev environment where I can grab the
>> plugins and search for places the index is used.  But if its not used
>> anywhere (or even if its not used much) then it should be deprecated
>> immediately so nobody uses it in new code. Use G_DEPRECATED I guess, plus
>> \deprecated in the doxygen comments, I don't know if we've deprecated
>> anything before have we?
>>
>> @Colomban, do we have a process for plugin API deprecation and removal?
>>
>
>
> Deprecation is difficult with our plugin mechanism, because all API
> function calls are macros that, after expansion, call via pointer. I don't
> think G_DEPRECATED (gcc's __attribute__((deprecated))) works via such
> indirect calls.


The member of the struct in plugindata.h (eg DocumentFuncs.document_index)
is a declaration, so it can be marked deprecated.  And that should cause
the warning when that member is used, even if its via a pointer inside a
macro.  So both the struct member and the actual function would need
deprecation.

And maybe we can stick #pragma message "Warning, Warning - deprecated
stuff" inside the IS_VALID() macro :)

Cheers
Lex


>
>
> Best regards.
> ______________________________**_________________
> Devel mailing list
> Devel at lists.geany.org
> https://lists.geany.org/cgi-**bin/mailman/listinfo/devel<https://lists.geany.org/cgi-bin/mailman/listinfo/devel>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20131024/3f50402d/attachment.html>


More information about the Devel mailing list