Author josh.r
Recipients josh.r, neologix, njs, pitrou, skrah, vstinner
Date 2014-04-15.22:17:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Additional comment on clarity: Might it make sense to make the calloc structure member take both the num and size arguments that the underlying calloc takes? That is, instead of:

void* (*calloc) (void *ctx, size_t size);

Declare it as:

void* (*calloc) (void *ctx, size_t num, size_t size);

Beyond potentially allowing more detailed tracing info at some later point (and much like the original calloc, potentially allowing us to verify that the components do not overflow on multiply, instead of assuming every caller must multiply and check for themselves), it also seems like it's a bit more friendly to have the prototype for the structure calloc to follow the same pattern as the other members for consistency (Principle of Least Surprise): A context pointer, plus the arguments expected by the equivalent C function.
Date User Action Args
2014-04-15 22:17:19josh.rsetrecipients: + josh.r, pitrou, vstinner, njs, skrah, neologix
2014-04-15 22:17:19josh.rsetmessageid: <>
2014-04-15 22:17:19josh.rlinkissue21233 messages
2014-04-15 22:17:18josh.rcreate