Huw D M Davies wrote:
Good catch. This classfactory code is fairly pervasive in Wine. I'll submit a patch fixing all other occurrences of this in a moment.
Maybe we should make a new janitorial task to turn all those class factories into singleton into objects too. It's not necessary to allocate a piece of memory at all for a class factory.
Mike
Mike McCormack wrote:
Huw D M Davies wrote:
Good catch. This classfactory code is fairly pervasive in Wine. I'll submit a patch fixing all other occurrences of this in a moment.
Maybe we should make a new janitorial task to turn all those class factories into singleton into objects too. It's not necessary to allocate a piece of memory at all for a class factory.
Or even better, a single implementation in a header file in include/wine Bonus points for also making a common regsvr implementation too.
Rob
Robert Shearman wrote:
Or even better, a single implementation in a header file in include/wine Bonus points for also making a common regsvr implementation too.
I considered writing a program to generate the code, since it is boilerplate code. The input could be the header file for the class factory, and the output the implementation.
Adding more non-standard header files may not be a direction we want to head in...
Mike
Mike McCormack wrote:
Robert Shearman wrote:
Or even better, a single implementation in a header file in include/wine Bonus points for also making a common regsvr implementation too.
I considered writing a program to generate the code, since it is boilerplate code. The input could be the header file for the class factory, and the output the implementation.
Adding more non-standard header files may not be a direction we want to head in...
But adding a non-standard program is?!?
Rob
Mike McCormack wrote:
I considered writing a program to generate the code, since it is boilerplate code. The input could be the header file for the class factory, and the output the implementation.
Adding more non-standard header files may not be a direction we want to head in...
Mike
Rrr, and when fixing a bug or making an Enhancement. all these files have to change. Code wizards are not code re-use. Even MS has their ATL or MFC to "implement once" all this grunt work. BUT wine no. must redo every thing from scratch. A rich wine-Internal implementation framework should be the direction to go. A new COM implementation should be an instantiation of one macro, or two, and the code itself. Clean fast and attractive for new hackers.
Or even better, a single implementation in a header file in include/wine Bonus points for also making a common regsvr implementation too.
... And if you convince Alexandre to let us have a wine utilities DLL rather than putting ever more code into inline functions, you win a free stuffed toy :)