jonathanstowe / TermReadKey

Character mode terminal access for Perl
12 stars 27 forks source link

static+consting+cc warnings+PERL_NO_GET_CONTEXT #10

Closed bulk88 closed 8 years ago

bulk88 commented 8 years ago

ReadKey.xs(543) : warning C4101: 'buffer' : unreferenced local variable -move decl into conditional CPP blocks

ReadKey.xs(667) : warning C4101: 'i' : unreferenced local variable -put CPP conditionals around decl

ReadKey.xs(1617) : warning C4244: 'function' : conversion from 'double' to 'DWOR D', possible loss of data -use DWORD everywhere, DWORD==U32, WaitForSingleObject takes integers not FP numbers for the timeout

-add PERL_NO_GET_CONTEXT to stop many TLS lookup function calls (specifically _pthread_getspecific or Perl_get_context)

-XS_INTERNAL, which contains static inside it, is only on newer perls, use it if available, skip creating XS_INTERNAL for old perls for now due to complexity

jonathanstowe commented 8 years ago

Looks good to me, thanks!