Revision: 972 Author: [email protected] Date: Fri Dec 18 09:04:20 2009 Log: Refactor Devel::NYTProf::ReadStream::output_nv() to take a list of values.
Unlike output_iv, this isn't much of a performance win, but given the similarity of the two XSubs, it's trivial to make this change. http://code.google.com/p/perl-devel-nytprof/source/detail?r=972 Modified: /trunk/FileHandle.xs ======================================= --- /trunk/FileHandle.xs Fri Dec 18 09:04:16 2009 +++ /trunk/FileHandle.xs Fri Dec 18 09:04:20 2009 @@ -644,16 +644,20 @@ XSRETURN(0); void -output_nv(handle, value) +output_nv(handle, ...) SV *handle -NV value PREINIT: NYTP_file fh; - CODE: + SV **last = sp + items; + PPCODE: if(!sv_isa(handle, "Devel::NYTProf::FileHandle")) croak("handle is not a Devel::NYTProf::FileHandle"); fh = (NYTP_file)SvPVX(SvRV(handle)); - output_nv(fh, value); + ++sp; /* A pointer to the function is first item on the stack. + It's not included in items */ + while(sp++ < last) + output_nv(fh, SvNV(*sp)); + XSRETURN(0); void -- You've received this message because you are subscribed to the Devel::NYTProf Development User group. Group hosted at: http://groups.google.com/group/develnytprof-dev Project hosted at: http://perl-devel-nytprof.googlecode.com CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf To post, email: [email protected] To unsubscribe, email: [email protected]
