Skip Menu |

This queue is for tickets about the Win32-CommandLine CPAN distribution.

Report information
The Basics
Id: 91893
Status: resolved
Priority: 0/
Queue: Win32-CommandLine

People
Owner: RIVY [...] cpan.org
Requestors: BULKDD [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: #define PERL_NO_GET_CONTEXT
You need a ------------------------ #define PERL_NO_GET_CONTEXT ------------------------ before ------------------------ #include "EXTERN.h" ------------------------ at https://metacpan.org/source/RIVY/Win32-CommandLine-v0.7.318_12237505/lib/Win32/CommandLine.xs#L1 or else your dll will be very big in KB and slow. This can be improved. ------------------------ row = (AV *)sv_2mortal((SV *)newAV()); av_push(row, newSVpv( "cntUsage", 0 )); av_push(row, newSVpv( "DWORD", 0 )); av_push(row, newSVnv( offsetof(PROCESSENTRY32, cntUsage) )); av_push(row, newSVpv( "L!", 0 )); av_push(results, newRV((SV *)row)); ----------------------- don't mortal it, instead replace newRV with newRV_noinc. I didn't compile your module, just glanced over it.
On Mon Jan 06 05:04:19 2014, BULKDD wrote: Show quoted text
> You need a > ------------------------ > #define PERL_NO_GET_CONTEXT > ------------------------ > before > ------------------------ > #include "EXTERN.h" > ------------------------ > > at https://metacpan.org/source/RIVY/Win32-CommandLine- > v0.7.318_12237505/lib/Win32/CommandLine.xs#L1 or else your dll will be > very big in KB and slow. > > This can be improved. > ------------------------ > row = (AV *)sv_2mortal((SV *)newAV()); > av_push(row, newSVpv( "cntUsage", 0 )); > av_push(row, newSVpv( "DWORD", 0 )); > av_push(row, newSVnv( offsetof(PROCESSENTRY32, cntUsage) )); > av_push(row, newSVpv( "L!", 0 )); > av_push(results, newRV((SV *)row)); > ----------------------- > don't mortal it, instead replace newRV with newRV_noinc. I didn't > compile your module, just glanced over it.
Thanks for the suggestions. I've tested and incorporated the suggested changes into v0.9+