Re: Automated testing failure

2012-02-08 Thread Nicholas Clark
continues with a suggestion that Devel::CheckLib might be useful in this sort of situation. Nicholas Clark

Re: Calling call_atexit() to clean up stuff initialized in BOOT

2009-03-19 Thread Nicholas Clark
On Thu, Mar 12, 2009 at 01:15:46PM +0100, Gregor Goldbach wrote: Nicholas Clark wrote: I understand initialization of an XS module may be modified using BOOT. However, there seems to be no counterpart of BOOT. How do I e.g. free memory I allocated in BOOT? [...] Or is the current

Re: Calling call_atexit() to clean up stuff initialized in BOOT

2009-03-12 Thread Nicholas Clark
, well, global, might not any more) Nicholas Clark

Re: Array reference

2008-10-24 Thread Nicholas Clark
the SvRV(...) only once, and store the result locally. Nicholas Clark

Re: How to generate autosplit.ix?

2008-08-15 Thread Nicholas Clark
autoloading via h2xs's -A flag, then my #defines are ignored also because -A implies the -c flag to omit constants. What am I missing here? I think you need the --skip-autoloader flag for h2xs Nicholas Clark

Re: Used only once in Perl 5.10

2008-04-28 Thread Nicholas Clark
a bitmask, never a simple TRUE/FALSE, but until recently the documentation wasn't very good. Nicholas Clark

Re: Used only once in Perl 5.10

2008-04-28 Thread Nicholas Clark
On Mon, Apr 28, 2008 at 11:50:37PM +0100, Nicholas Clark wrote: On Mon, Apr 28, 2008 at 03:48:35PM -0700, Jan Dubois wrote: Use the GV_ADDMULTI flag: if (sv = get_sv(Win32::SqlServer::Version, TRUE | GV_ADDMULTI)) Really that should be if (sv = get_sv(Win32

Re: Working with unsigned long long

2007-10-26 Thread Nicholas Clark
variable for non-threaded builds, and access to thread-local storage for threaded builds. Nicholas Clark

Re: Passing 64-bit integers from perl to C

2007-02-13 Thread Nicholas Clark
might need to manage the sign explicitly. Nicholas Clark

Re: Memory...growing, and growing

2007-01-08 Thread Nicholas Clark
On Mon, Jan 08, 2007 at 10:39:57AM -0800, Marvin Humphrey wrote: On Jan 8, 2007, at 10:26 AM, Nicholas Clark wrote: Am I doing something wrong? Maybe because of refcounts and such? Yes, I think so. (But I'm not the expert on these) 8 snip 8 RETVAL = sv_2mortal

Re: Memory...growing, and growing

2007-01-08 Thread Nicholas Clark
. Curious. We thought that we'd nailed (most?) every leak in current blead. As of about a week ago, Dave got the last known eval leaks. (Although the fix is fragile, and if it causes more problems than it solves, he'll back it out) Nicholas Clark

Re: Using PerlIO to add an encryption layer

2006-06-25 Thread Nicholas Clark
as a transformation layer akin to PerlIO::encoding, rather than a lowest layer akin to unix. Nicholas Clark

Re: Catching Perl_croak() from XS

2006-04-27 Thread Nicholas Clark
Perl_croak(), and if they do, I need to destroy the object if I don't want to leak memory. Here's an excerpt of the original code: Is this the way to do it? I think you could also use SAVEDESTRUCTOR() and SAVEDESTRUCTOR_X() Nicholas Clark

Re: Access to actual SV data

2006-02-10 Thread Nicholas Clark
of the SV, and the length of the data in the buffer. Nicholas Clark

Re: 64-bit

2005-10-11 Thread Nicholas Clark
for 5.8.8 Nicholas Clark

Re: segfault while DELETE THIS

2005-08-17 Thread Nicholas Clark
)); SvIV(SvRV($arg)) } else { warn(\$arg is not a blessed object\); XSRETURN_UNDEF; } If I make the above change to use SvRV then I can avoid getting a segfault. Nicholas Clark

Re: cast to pointer from integer of different size

2005-07-27 Thread Nicholas Clark
stable compared with where? Some FreeBSD stable perls are compiled with -Duse64bitint, which will mean that sizeof(IV) is twice the size of sizeof(void *) on x86. (and yes, INT2PTR) Nicholas Clark

Re: Does Devel::Peek do anything to scalars to

2005-07-19 Thread Nicholas Clark
to run it under a debugger and get a stack backtrace? I'm using perl 5.8.7, compiled with MS Visual C++ Toolkit 2003 (the free version). This shouldn't make a difference. If you've got access to x86 Linux, and the code is portable to Linux, have you tried running it under valgrind? Nicholas

Re: Weird PVMG

2005-07-05 Thread Nicholas Clark
to internally become encoded as UTF-8, then the scalar will be PVMG, even if the value it now holds is pure 7 bit ASCII now. Nicholas Clark

Re: perl 5.6, Data::Dumper, and PL_sv_undef as a hash value

2005-06-20 Thread Nicholas Clark
'} = ${\$VAR1-{'3'}}; because the hash assignment does a copy, not a binding. Nicholas Clark

Re: perl 5.6, Data::Dumper, and PL_sv_undef as a hash value

2005-06-20 Thread Nicholas Clark
. Nicholas Clark

Re: Threads and BOOT section

2005-05-31 Thread Nicholas Clark
Also, I've just realised that the perlmod.pod shipped in 5.8.7 is erroneous - CLONESKIP was only added in 5.8.7, not 5.7.2 as it seems to suggest. Nicholas Clark

Re: Converting long longs to SVs

2005-05-25 Thread Nicholas Clark
. Nicholas Clark

Re: SvUTF8_on woes

2005-03-30 Thread Nicholas Clark
? What is the proper way to create a UTF-8 string--from UTF-8 source--in perl xs? You're doing the correct thing to create a Unicode string. You need to use binmode to flag that the filehandle was expecting UTF-8 output. Nicholas Clark

Re: av_undef

2005-03-05 Thread Nicholas Clark
. (between 5.8.5 and 5.8.6, IIRC) Nicholas Clark

Re: av_undef

2005-03-05 Thread Nicholas Clark
of the referent by one. As things are created with one reference, this means that if you do nothing but create scalars and then store them in hashes or arrays, you don't need to do anything further to get the reference counts correct. Nicholas Clark

Re: Confusion with stricmp on Win32

2005-01-26 Thread Nicholas Clark
to be a standard function in any standard implemented on Unix, but strcmp()'s return is stated only to be an integer greater than, equal to, or less than 0, not specifically -1 or +1 Nicholas Clark

Re: Segmentation fault :(

2004-11-17 Thread Nicholas Clark
messages. They're not spam messages. Thanks for getting back to say that you found your problem - letting people know that you've found the problem stops people chasing things down unnecessarily. Nicholas Clark

Re: Numerical maximum in XS

2004-11-16 Thread Nicholas Clark
as an integer, rather than if it's numerically identical to the NV, because NV maths takes priority. eg: $ ~/Reference/5.6.2/bin/perl5.6.2-32 -MDevel::Peek -e '$a = 3.2; $a 1; Dump $a' SV = PVNV(0x8010a0) at 0x806e6c REFCNT = 1 FLAGS = (IOK,NOK,pIOK,pNOK,IsUV) UV = 3 NV = 3.2 PV = 0 Nicholas

Re: How to redirect STDERR under WIN32

2004-08-09 Thread Nicholas Clark
runs on Win32 (and other stuff, even EPOC, IIRC) which is in util.c, is this the right point to re-implement the Win32 pipe() in terms of that? Or is this irrelevant? Nicholas Clark

Re: How to redirect STDERR under WIN32

2004-08-08 Thread Nicholas Clark
_think_ this option disables that buggy scheme in favour of one more like other systems. Will take a look. The source code is still recoverable from the partition? Could someone else take it over and get it finished? Nicholas Clark

Re: h2xs with C++

2004-06-28 Thread Nicholas Clark
for the same reason. Nicholas Clark

Re: Using DEFSV

2004-06-01 Thread Nicholas Clark
for XSUBs. I think we either have to make it part of the public API, so embed.fnc will take care of the rest, or explicitly use Perl_pad_findmy(). Surely neither is necessary, as on all perl5.8.x (and earlier), $_ will never be in the pad. Nicholas Clark

Re: Writing a module, Segmentation fault

2004-05-29 Thread Nicholas Clark
function, hence your segfault] Nicholas Clark PS Your mailer did evil things to your source code - it wrapped some of the lines, and seems to have changed a lot of spaces (or maybe tabs) into non-breaking spaces (chr(160))

Re: ISO warnings?

2004-05-03 Thread Nicholas Clark
the gcc-specific constructs) Nicholas Clark

Re: Numbers and associated flags.

2004-04-24 Thread Nicholas Clark
that includes a fractional component). Try Perl_floor() on the value and see if it's identical to the original. (I think that this will always work.) This answers your question as phrased. Not all integer values fit into IVs. Nicholas Clark

Re: Why does a lexical have the same address

2004-04-24 Thread Nicholas Clark
, so as Nick says you must unshare anything when you finish with it. The hash is a value calculated with PERL_HASH Chasing the source code in hv.c, no it doesn't look like you can just use 0. Nicholas Clark

Re: Mail Quarantined: 'Re: Segfaults from XS code' [MMID=112.20040110-160125.002.028205]

2004-01-11 Thread Nicholas Clark
-subscribed PDQ. Likewise if anyone mails me and I find that I get a challenge response back, I'm going to ignore it. Nicholas Clark

Re: Embedding problem with call_argv on 5.8.0 threaded ...

2003-06-09 Thread Nicholas Clark
is why you the same thing working on unthreaded, and failing spectacularly on a threaded build. Nicholas Clark

Re: Namespace Issues

2003-01-30 Thread Nicholas Clark
. Nicholas Clark

Re: Having a C function directly push onto the stack

2003-01-17 Thread Nicholas Clark
a problem. But, obviously, I could be wrong, as XS isn't really something I know that much about. Nicholas Clark

Re: SvPV_nolen() and newSVuv() for pre-5.6.0 perls

2002-10-26 Thread Nicholas Clark
it as a dependency in Makefile.PL Devel::PPPort is supplied in the core for 5.8.0, but I believe that you can also get the current version separately from CPAN. Nicholas Clark -- INTERCAL better than perl? http://www.perl.org/advocacy/spoofathon/

Re: Debugging c++ shared libraries

2002-05-21 Thread Nicholas Clark
On Mon, May 20, 2002 at 05:12:24PM -0700, Bill Moseley wrote: At 10:49 PM 05/20/02 +0100, Nicholas Clark wrote: He means run 'make perl' in the extension directory, rather than make It builds a new perl statically linked with the extension. I'm feeling more clueless. So, I built perl