Skip Menu |
 
Report information
Id: 32660
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: dom [at] ppe.happygiraffe.net
Cc:
AdminCc:

Operating System: freebsd
PatchStatus: (no value)
Severity: medium
Type: docs
Perl Version: 5.8.5
Fixed In: (no value)



Subject: INT2PTR not mentioned in perlxs(1)
Date: Sat, 27 Nov 2004 20:55:30 +0000 (GMT)
To: perlbug [...] perl.org
From: dom [...] happygiraffe.net (Dominic Mitchell)
Download (untitled) / with headers
text/plain 4.1k
This is a bug report for perl from dom@ppe.happygiraffe.net, generated with the help of perlbug 1.35 running under perl v5.8.5. ----------------------------------------------------------------- [Please enter your report here] There is no mention in the perlxs(1) man page about INT2PTR. In particular, the variant of T_PTROBJ that is given as an example (T_PTROBJ_SPECIAL) needs to include this. This is what it should look like: TYPEMAP Net_Config T_PTROBJ_SPECIAL INPUT T_PTROBJ_SPECIAL if (sv_derived_from($arg, \"${(my $ntt=$ntype)=~s/_/::/g;\$ntt}\")) { IV tmp = SvIV((SV*)SvRV($arg)); $var = INT2PTR($type, tmp); } else croak(\"$var is not of type ${(my $ntt=$ntype)=~s/_/::/g;\$ntt}\") OUTPUT T_PTROBJ_SPECIAL sv_setref_pv($arg, \"${(my $ntt=$ntype)=~s/_/::/g;\$ntt}\", (void*)$var); [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=docs severity=medium --- Site configuration information for perl v5.8.5: Configured by dom at Tue Aug 10 13:45:55 BST 2004. Summary of my perl5 (revision 5 version 8 subversion 5) configuration: Platform: osname=freebsd, osvers=5.2-current, archname=i386-freebsd-64int uname='freebsd ppe.happygiraffe.net 5.2-current freebsd 5.2-current #5: sat aug 7 16:57:18 bst 2004 root@ppe.happygiraffe.net:usrobjusrsrcsysppe i386 ' config_args='-sde -Dprefix=/usr/local -Darchlib=/usr/local/lib/perl5/5.8.5/mach -Dprivlib=/usr/local/lib/perl5/5.8.5 -Dman3dir=/usr/local/lib/perl5/5.8.5/perl/man/man3 -Dman1dir=/usr/local/man/man1 -Dsitearch=/usr/local/lib/perl5/site_perl/5.8.5/mach -Dsitelib=/usr/local/lib/perl5/site_perl/5.8.5 -Dscriptdir=/usr/local/bin -Dsiteman3dir=/usr/local/lib/perl5/5.8.5/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dcc=cc -Doptimize=-O -pipe -march=athlon -Duseshrplib -Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.5/BSDPAN" -Ud_dosuid -Ui_gdbm -Dusethreads=n -Dusemymalloc=y -Duse64bitint' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=undef uselongdouble=undef usemymalloc=y, bincompat5005=undef Compiler: cc='cc', ccflags ='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.5/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include', optimize='-O -pipe -march=athlon', cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.5/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='3.4.2 [FreeBSD] 20040728', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags ='-Wl,-E -L/usr/local/lib' libpth=/usr/lib /usr/local/lib libs=-lgdbm -lm -lcrypt -lutil -lc perllibs=-lm -lcrypt -lutil -lc libc=, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-R/usr/local/lib/perl5/5.8.5/mach/CORE' cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib' Locally applied patches: --- @INC for perl v5.8.5: /usr/local/lib/perl5/site_perl/5.8.5/mach /usr/local/lib/perl5/site_perl/5.8.5 /usr/local/lib/perl5/site_perl/5.8.4 /usr/local/lib/perl5/site_perl/5.8.2 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.5/BSDPAN /usr/local/lib/perl5/5.8.5/mach /usr/local/lib/perl5/5.8.5 . --- Environment for perl v5.8.5: HOME=/home/dom LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/home/dom/bin:/usr/local/jdk1.4.2/bin PERL_BADLANG (unset) SHELL=/usr/local/bin/zsh
Download (untitled) / with headers
text/plain 177b
Comment is right: INT2PTR is often needed in typemap. I will check the example in perlxs.pod and change it to use INT2PTR, and add an explanation of INT2PTR (and PTR2*) macros.
Subject: [PATCH pod/perlxs.pod] RE: [perl #32660] INT2PTR not mentioned in perlxs(1)
Date: Tue, 4 Jan 2005 12:32:29 -0000
To: "'perl5-porters [...] perl.org'" <perl5-porters [...] perl.org>
From: Robin Barker <Robin.Barker [...] npl.co.uk>
Download (untitled) / with headers
text/plain 5.3k
This bug is valid: INT2PTR is necessary/used in some existing typemap files. The attached patch includes INT2PTR in the code in pod/perlxs.pod (as suggested) and adds a couple of sentences explaining INT2PTR and PTR2IV, etc. I think the ticket can be closed. Robin Show quoted text
-----Original Message----- From: dom@ppe.happygiraffe.net (via RT) [mailto:perlbug-followup@perl.org] Sent: 27 November 2004 20:56 To: perl5-porters@perl.org Subject: [perl #32660] INT2PTR not mentioned in perlxs(1) # New Ticket Created by dom@ppe.happygiraffe.net # Please include the string: [perl #32660] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=32660 > This is a bug report for perl from dom@ppe.happygiraffe.net, generated with the help of perlbug 1.35 running under perl v5.8.5. ----------------------------------------------------------------- [Please enter your report here] There is no mention in the perlxs(1) man page about INT2PTR. In particular, the variant of T_PTROBJ that is given as an example (T_PTROBJ_SPECIAL) needs to include this. This is what it should look like: TYPEMAP Net_Config T_PTROBJ_SPECIAL INPUT T_PTROBJ_SPECIAL if (sv_derived_from($arg, \"${(my $ntt=$ntype)=~s/_/::/g;\$ntt}\")) { IV tmp = SvIV((SV*)SvRV($arg)); $var = INT2PTR($type, tmp); } else croak(\"$var is not of type ${(my $ntt=$ntype)=~s/_/::/g;\$ntt}\") OUTPUT T_PTROBJ_SPECIAL sv_setref_pv($arg, \"${(my $ntt=$ntype)=~s/_/::/g;\$ntt}\", (void*)$var); [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=docs severity=medium --- Site configuration information for perl v5.8.5: Configured by dom at Tue Aug 10 13:45:55 BST 2004. Summary of my perl5 (revision 5 version 8 subversion 5) configuration: Platform: osname=freebsd, osvers=5.2-current, archname=i386-freebsd-64int uname='freebsd ppe.happygiraffe.net 5.2-current freebsd 5.2-current #5: sat aug 7 16:57:18 bst 2004 root@ppe.happygiraffe.net:usrobjusrsrcsysppe i386 ' config_args='-sde -Dprefix=/usr/local -Darchlib=/usr/local/lib/perl5/5.8.5/mach -Dprivlib=/usr/local/lib/perl5/5.8.5 -Dman3dir=/usr/local/lib/perl5/5.8.5/perl/man/man3 -Dman1dir=/usr/local/man/man1 -Dsitearch=/usr/local/lib/perl5/site_perl/5.8.5/mach -Dsitelib=/usr/local/lib/perl5/site_perl/5.8.5 -Dscriptdir=/usr/local/bin -Dsiteman3dir=/usr/local/lib/perl5/5.8.5/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dcc=cc -Doptimize=-O -pipe -march=athlon -Duseshrplib -Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.5/BSDPAN" -Ud_dosuid -Ui_gdbm -Dusethreads=n -Dusemymalloc=y -Duse64bitint' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=undef uselongdouble=undef usemymalloc=y, bincompat5005=undef Compiler: cc='cc', ccflags ='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.5/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include', optimize='-O -pipe -march=athlon', cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.5/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='3.4.2 [FreeBSD] 20040728', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags ='-Wl,-E -L/usr/local/lib' libpth=/usr/lib /usr/local/lib libs=-lgdbm -lm -lcrypt -lutil -lc perllibs=-lm -lcrypt -lutil -lc libc=, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-R/usr/local/lib/perl5/5.8.5/mach/CORE' cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib' Locally applied patches: --- @INC for perl v5.8.5: /usr/local/lib/perl5/site_perl/5.8.5/mach /usr/local/lib/perl5/site_perl/5.8.5 /usr/local/lib/perl5/site_perl/5.8.4 /usr/local/lib/perl5/site_perl/5.8.2 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.5/BSDPAN /usr/local/lib/perl5/5.8.5/mach /usr/local/lib/perl5/5.8.5 . --- Environment for perl v5.8.5: HOME=/home/dom LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/home/dom/bin:/usr/local/jdk1.4.2/bin PERL_BADLANG (unset) SHELL=/usr/local/bin/zsh ------------------------------------------------------------------- This e-mail and any attachments may contain confidential and/or privileged material; it is for the intended addressee(s) only. If you are not a named addressee, you must not use, retain or disclose such information. NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses. NPL Management Ltd. Registered in England and Wales. No: 2937881 Registered Office: Teddington, Middlesex, United Kingdom TW11 0LW. -------------------------------------------------------------------
Download 32660.gz
application/octet-stream 617b

Message body not shown because it is not plain text.

CC: Perl 5 Porters <perl5-porters [...] perl.org>
Subject: Re: [PATCH pod/perlxs.pod] RE: [perl #32660] INT2PTR not mentioned in perlxs(1)
Date: Tue, 04 Jan 2005 14:36:54 +0100
To: Robin Barker <Robin.Barker [...] npl.co.uk>
From: "H.Merijn Brand" <h.m.brand [...] hccnet.nl>
Download (untitled) / with headers
text/plain 853b
On Tue 04 Jan 2005 13:32, Robin Barker <Robin.Barker@npl.co.uk> wrote: Show quoted text
> This bug is valid: INT2PTR is necessary/used in some existing typemap files. > > The attached patch includes INT2PTR in the code in pod/perlxs.pod (as suggested) > and adds a couple of sentences explaining INT2PTR and PTR2IV, etc.
Thanks, this cleanly applied to blead as change #23742 I will close the ticket. It's up to the 5.8.x pumpking to integrate in maint Show quoted text
> I think the ticket can be closed. > > Robin
-- H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/) using perl-5.6.1, 5.8.5, & 5.9.x, and 809 on HP-UX 10.20 & 11.00, 11i, AIX 4.3, AIX 5.2, SuSE 9.1, and Win2k. http://www.cmve.net/~merijn/ http://archives.develooper.com/daily-build@perl.org/ perl-qa@perl.org send smoke reports to: smokers-reports@perl.org, QA: http://qa.perl.org
Solved in fix 23742


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org