<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On 10 June 2013 00:43, Roger Booth <span dir="ltr"><<a href="mailto:rbooth@kabooth.com" target="_blank">rbooth@kabooth.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div><div class="h5">
    <div>On 06/09/2013 07:18 AM, Lex Trotman
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">[...]
        <div><br>
        </div>
        <div>But if I'm going to *improve* the docs, I *still* have an
          outstanding (in a manner of speaking) question:
          <div class="gmail_extra">
            <div class="gmail_quote">
              <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div bgcolor="#FFFFFF" text="#000000"> <br>
                  Why does the function plugin_init() accept the one
                  parameter GeanyData*?<br>
                  <br>
                  The reason that is a question is that the three global
                  variables <br>
                  <div> <br>
                    GeanyPlugin         *geany_plugin;<br>
                    GeanyData           *geany_data;<br>
                    GeanyFunctions      *geany_functions;<br>
                    <br>
                  </div>
                  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().<br>
                </div>
              </blockquote>
              <div><br>
              </div>
              <div>Yes it is the same.</div>
              <div> </div>
              <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div bgcolor="#FFFFFF" text="#000000"> <br>
                  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(). <br>
                </div>
              </blockquote>
              <div><br>
              </div>
              <div>Since it is generally acknowledged that
                globals are bad, possibly someone started the process of
                removing the globals by switching to passing as
                parameters, but did not get time to finish the process
                or ran into other problems, but there is no indication I
                can find of why its that way.</div>
              <div> </div>
              <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div bgcolor="#FFFFFF" text="#000000">[...]</div>
              </blockquote>
              <div><br>
              </div>
              <div>Cheers</div>
              <div>
                Lex</div>
              <div> </div>
              <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<br>
                Devel mailing list<br>
                <a href="mailto:Devel@lists.geany.org" target="_blank">Devel@lists.geany.org</a><br>
                <a href="https://lists.geany.org/cgi-bin/mailman/listinfo/devel" target="_blank">https://lists.geany.org/cgi-bin/mailman/listinfo/devel</a><br>
                <br>
              </blockquote>
            </div>
            <br>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
Devel mailing list
<a href="mailto:Devel@lists.geany.org" target="_blank">Devel@lists.geany.org</a>
<a href="https://lists.geany.org/cgi-bin/mailman/listinfo/devel" target="_blank">https://lists.geany.org/cgi-bin/mailman/listinfo/devel</a>
</pre>
    </blockquote></div></div>
    So when I document plugin_init(), you are OK with me saying that the
    developer can use the global variable geany_data interchangeably
    with the parameter to plugin_init(), and this behavior will not
    change until -- gee, is this when the ABI changes?<br></div></blockquote><div><br></div><div style>Yes that would be an ABI change, and an API change.</div><div style><br></div><div style>I am not aware of anyone proposing to change this at the moment, so you should be ok.</div>
<div style><br></div><div style>Cheers</div><div style>Lex</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
  </div>

<br>_______________________________________________<br>
Devel mailing list<br>
<a href="mailto:Devel@lists.geany.org">Devel@lists.geany.org</a><br>
<a href="https://lists.geany.org/cgi-bin/mailman/listinfo/devel" target="_blank">https://lists.geany.org/cgi-bin/mailman/listinfo/devel</a><br>
<br></blockquote></div><br></div></div>