On 24/10/2013 10:24, Lex Trotman wrote:
Okay, but you still agree that doc->is_valid should be removed eventually?
That's a step forward:)
Of course I agree. So its not a terribly big step:)
I only skimmed the discussion, but how can we remove that?
I think freeing document memory has high potential to break things. There are a few places where Geany assumes document memory isn't freed over time.
If people don't like foreach_document (or Matt's improved C99 foreach_doc with document pointers), we could add document_get_all or something that returned a list of valid pointers. That can be done without breaking existing code. Personally I prefer Matt's suggested macro because you don't have to free the list.