On Fri, Aug 30, 2013 at 08:18:59AM -0400, Matthew Horsfall (alh) wrote: > On Fri, Aug 30, 2013 at 7:43 AM, Nicholas Clark <nick@ccl4.org> wrote: > > > I'm wary of documenting exactly the current state, as I see that > > newXS_len_flags() would be preferable to what we have, as it would avoid a > > needless strlen() call. > > > > How would we avoid the strlen call? > > It looks like newXS_len_flags() still needs the length of char * perl_name > passed to it. Yes. The length is known, but being throw away by the XS typemap: void dl_install_xsub(perl_name, symref, filename="$Package") char * perl_name void * symref const char * filename Change char *perl_name to SV *perl name, and one can get the length. (And, like every other filename interaction, start to wonder which character set the OS was expecting. Rather than pretending to ignore it) Nicholas ClarkThread Previous | Thread Next