On Mon, 24 Dec 2007 11:24:46 -0600, "Jeff Pohlmeyer" yetanothergeek@gmail.com wrote:
On Dec 21, 2007 4:32 AM, Enrico Tröger enrico.troeger@uvena.de wrote:
To avoid future problems it's probably a good idea to use the macros in plugins/pluginmacros.h.
Okay, I am converting geanylua over to use the "pluginmacros.h" file, but I see something that looks a little bit strange:
src/document.h:71 extern GArray *doc_array; plugins/pluginmacros.h:31 #define doc_array geany_data->doc_array
Plugins don't have direct access to the doc_array of document.h (except they "fetch" the pointer explicitly). But plugins can acces the doc_array via the geany_data structure and therefore the doc_array macro exists. Without the macro there will be many undefined references to doc_array because the doc_array from document.h isn't available for plugins.
Maybe it is a bit confusing because of the same names for the variable, field name and the macro but it works ;-).
Regards, Enrico