New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
documents_array not exported #964
Comments
Can you not use But, as its documented to be in the API it looks simply like its a bug. |
@elextr no, I need to loop over each document. |
@codebrainz you could use the hated foreach macro then. There is an argument to be made that given the semantics of the pointers in |
|
I said the |
The |
IIUC it uses a pointer hidden in another structure, not the direct access to the symbol. |
It accesses |
Oh, I misread it, it returns an index to the array, I read it as returning an ID, ok, we probably need a |
I think we should just remove the global variables like this which are already accessible through |
Can't you use |
Okay, looks like we broke API at some point, but is it wise to re-add that when it's accessible through |
No I don't think it's wise. I think we should just remove it('s docs) from the plugin API. It's cleaner to access it through |
…ration Major changes are: - Some types were accidentally documented, even though they couldn't be accessed by any exported API functions. Those are removed (especially from encodings.h). - Some types were not documented where they should. Documentation is added for them. Members are not necessarily documented separately if names are self-explanatory. - @A XXX refers to parameters of the function, it's inappropriate for highlighting NULL (change to @c) - As per consensus, build_info is removed from GeanyData (replaced by pointer to avoid ABI break; added grep-able abi-todo tag so it doesn't get forgotten)
The global was never accessible to plugins on Windows and hasn't been accessible to plugins on Linux and others since the linkage-cleanup changes. Move documentation from the global variable to the GeanyData member of the same name. Closes geany#964
what life time issues? Since we are single threaded we can safely assume that documents don't go away during a loop |
If a plugin held on to a |
My Code-Format plugin uses the
documents_array
symbol, but this symbol is not exported to plugins anymore. Got an undefined symbol error for this in the Debug Messages. AddingGEANY_API_SYMBOL
macro todocuments_array
indocument.c
fixes the issue.This was always broken on Windows, and since the
linkage-cleanup
changes, on Linux too.The text was updated successfully, but these errors were encountered: