[Geany-Devel] Adding a plugin
Roger Booth
rbooth at xxxxx
Sun Jun 9 12:41:49 UTC 2013
On 06/09/2013 04:48 AM, Frank Lanitz wrote:
> On Sun, 09 Jun 2013 03:54:05 -0700
> Roger Booth <rbooth at kabooth.com> wrote:
>
>> I assume you are surprised by this. How dare the user of our docs not
>> study to great lengths the implementations of the shit we (and others
>> that have come before us) have produced. Nobody should have the
>> effrontery to attempt to interface our code without spending a
>> sufficient amount of time appreciating the edifice we have erected.
> Please don't be a party-puper. Geany is FLOSS and everybody is welcome
> to improve ... also the documentation. You recognized that the
> documentation might not be clear in all cases. .. yepp. That's true.
> But it's hard to find such things for somebody who knows the code from
> deep inside the heard that Geany-Version -> API-Version -> ABI-Version.
> so no need to document it for them.
> Please take a look at github and improve the parts of documentation.
> Complaining on the mailing list that the whole documentation suckz just
> is making people spending a lot of spare time sad and sending them into
> aggro-mode.
>
> Would be really happy to see a patch improving that aspect from
> documentation as well as the Plugin-HowTo.
>
> cheers,
> Frank
>
>
> _______________________________________________
> Devel mailing list
> Devel at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel
But if I'm going to *improve* the docs, I *still* have an outstanding
(in a manner of speaking) question:
Why does the function plugin_init() accept the one parameter GeanyData*?
The reason that is a question is that the three global variables
GeanyPlugin *geany_plugin;
GeanyData *geany_data;
GeanyFunctions *geany_functions;
are available to a plugin and you will notice that one of those global
variables is geany_data which is suspiciously similar to the parameter
to plugin_init().
So either there is no reason to pass the parameter to plugin_init() or
there is a good reason to pass the parameter to plugin_init().
Either way, I'd like to know. Maybe others would to.
A previous reply from Matthew Brush made me think that I need to really
spell out what I mean here. Say I have the following
GeanyData *geany_data;
extern "C" void plugin_init(GeanyData *bob)
{
if(*geany_data == *bob) {
exit(1);
} else {
exit(2);
}
}
What I'm trying to ask by this example, and remember, I'm a moron, is
'is geany_data the same as bob?'
Please don't get all wishy-washy on me here. geany_data and bob are both
pointers. My question is
Do bob and geany_data point to the same location in memory.
Now you could all say "geez, moron, just do a comparison". I know how to
do that. But that would only say that this version is blah.
What I want to know is about API guarantees. I want to be able to
document the plugin_init() function and say
geany_data == bob
or not.
P.S.
>> Complaining on the mailing list that the whole documentation suckz
Um, I was commenting on one macro for the plugin API. Actually, I think
in general the docs are superb. I want to improve the areas where I see
they can be improved, and I volunteer to do so and have already done so.
What pissed me off was my impression that yall thought this particular
area of the docs was just peachy and I was just blowing smoke.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20130609/8ef99ea9/attachment-0001.html>
More information about the Devel
mailing list