From: Bruno H. <br...@cl...> - 2005-01-25 10:59:49
|
Hi Sam, This function is unusable because underspecified: /* bit sequence --> integer */ global maygc object udigits_to_I (void* digits, uintC len) { 1) The documentation should specify details about the input (is 'digits' pointing to a single object of type void or to multiple ones? is len > 0 or can it be 0 ? Is the input in big-endian or little-endian order?) 2) The doc should mention "can trigger GC"! 3) In C, a 'void *' designates a pointer to memory of undefined contents. It's not useful to access such memory. If there is data at *digits, you need to specify the element size. 4) Does the function write to *digits? If not, then why is the 'digits' pointer not 'const'? 5) The function is lacking a comment of its own in lispbibl.d. Imagine how unusable lispbibl.d would be if it contained only function declarations without comments! Bruno |