On Thu, May 19, 2011 at 4:27 PM, Kirill Lapshin <k...@lapshin.net> wrote:
> Hi Roman/all, > > Today I've found what I believe a bug in balanced file writer. > > Suppose you have 24 class_creators and trying to split them into 10 > buckets. What it currently does is: > - how many creators per bucket? 24/10 = 2. uhm, ok. > - split_sequence of 24 creators by 2, this returns 12 buckets > - is actual number of buckets greater than requested? yes 12>10. Ok lets > peel of last bucket and merge it into one before last. > > Now we've got 11 buckets, and we happily write 11 files... but user asked > for 10. > > Here is a patch to fix it, it simply distributes class creators over > buckets in round robin. > Thank you for finding bug and providing a fix! > Any chance to get it applied? > > As in many cases, the answer is "yes" and "no". "Yes" - please open a ticket on sourceforge. I have few interesting plans for version 2.0 which will introduce few breaking changes. I'll be glad to insert your patch too "No" - this is a "silent" breaking change. The developer may not pay attention, that the last file was not updated by the code generator and still to compile it. So, in this specific case, I prefer to keep the whole process backward compatible and introduce the patch. Hope, you understand.
_______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig