---------------------------------------- > Date: Mon, 18 Jun 2012 10:39:45 -0700 > From: rev.chip@gmail.com > To: bulk88@hotmail.com > Subject: Re: Time for a 64-bit perl API? > > On 6/18/2012 9:46 AM, bulk 88 wrote: > > A problem I've run into in the past is ((__int64)-1) == ((int)-1) is false. > > Well, that's not true. So I think you do not understand the situation. > > _________________________________________ #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "ppport.h" #define ERRORFLAG (-1) void my_cmp(pTHX_ size_t num){ size_t num2 = ERRORFLAG; if(num != num2) croak("not equal"); } MODULE = Local::XS PACKAGE = Local::XS void neg1() PREINIT: unsigned int num; PPCODE: num = ERRORFLAG; my_cmp(aTHX_ num); ________________________________________ #!/usr/bin/perl -w use strict; use Local::XS; Local::XS::neg1(); ________________________________________ not equal at n1.pl line 4. ________________________________________ This compiled with no warnings on a x64 machine with Visual C. I already know how this went wrong. I noticed my last message didn't make it to p5p due to a mistake of mine.Thread Previous | Thread Next