Hi, This is an update for anyone that hasn't looked at the new SVN branch.
On Tue, 10 Jun 2008 16:51:59 +0100 Nick Treleaven nick.treleaven@btinternet.com wrote:
- The document functions could take/return a GeanyDocument
pointer instead of a document index, which would avoid the use of: documents[idx]->
This code is now in the SVN branches/document-pointer directory, and will be merged probably next week, after some related things have been done.
...
This could be quite a big change, so it could be brought in gradually by having an additional p_documents field in GeanyFunctions, using a documents_ prefix for the new functions instead of document_. Once the changes are complete we could deprecate the old ones.
I changed my mind - I don't think we should have both p_document and p_documents - this just delays when we break plugins, and if we did that we'd still have to break the ABI to remove p_documents. The idea was also to rename the document_ prefix documents_, but this won't be done now (see earlier mails in this thread).
I think it can be done without breaking things - my first goal is to update the plugin API, so the core would be unaffected at first. I'll add a private Document::index field and then wrap the adapted document functions
This field is now public - GeanyDocument::index. This might make porting easier, and may be useful in other ways.
Regards, Nick