On 2020/02/03 21:33:11, Dan Eble wrote: > Next try: http://codereview.appspot.com/565610043
It's probably more an academical remark, but a "kosher" way of doing that might be using scm_to_int (scm_length (...)) instead of scm_ilength (...). This will take out the length in the form it has been produced without a cast, throwing an error if it does not fit. It is likely that it comes at the cost of converting a size_t to SCM and then out again as int which would be sort of ridiculous. At the actual sizes we are talking about, the cost would probably not be all that large. Probably not worth the trouble, but there might be other situations where such an approach could prove more satisfactory. https://codereview.appspot.com/561350044/