From: <li...@mi...> - 2007-06-13 18:00:45
|
On Mon, Jun 11, 2007 at 06:01:51PM -0500, Mike Borella wrote: > Michael, > > Thanks for the note. If I understand correctly, you are changing the > generated code so that is does not allocate any memory. This is a good > technique that I have actually required of my vendors from time to time. > It certainly helps with the debugging. One more argument for doing this change is that then the C code will be closer to the C++ code because the C++ code doesn't allocate any memory right now. > I'm a bit embarrassed that I never thought of this 7 years ago :) > > Will the user of genparse now have to allocate memory before calling the > genparse functions? If so we should document that very clearly. I absolutely agree. I plan to look through the man and info pages and I will have to regenerate the C examples. My question is: Do we really have to support both solutions (the existing one which allocates memory) and the new one (which doesn't allocate any memory)? The problem with throwing away the old solution is that this would break compatibility. How popular is Genparse today? Can we still afford to make incompatible changes? Will it be a problem for you personally, Mike? The big advantage of dropping the old memory allocating solution is simplicity. The code will become simpler and we avoid adding one more command line option to Genparse. I would vote for dropping the old solution and not confuse any users with 2 different implementations for the C output. Michael |