Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INT2PTR not mentioned in perlxs(1) #7617

Closed
p5pRT opened this issue Nov 27, 2004 · 8 comments
Closed

INT2PTR not mentioned in perlxs(1) #7617

p5pRT opened this issue Nov 27, 2004 · 8 comments

Comments

@p5pRT
Copy link

p5pRT commented Nov 27, 2004

Migrated from rt.perl.org#32660 (status was 'resolved')

Searchable as RT32660$

@p5pRT
Copy link
Author

p5pRT commented Nov 27, 2004

From dom@ppe.happygiraffe.net

Created by dom@ppe.happygiraffe.net

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);

Perl Info

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

@p5pRT
Copy link
Author

p5pRT commented Dec 27, 2004

From rmb1@cise.npl.co.uk

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.

@p5pRT
Copy link
Author

p5pRT commented Jan 4, 2005

From Robin.Barker@npl.co.uk

Created by dom@ppe.happygiraffe.net

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);

Perl Info

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.
-------------------------------------------------------------------

@p5pRT
Copy link
Author

p5pRT commented Jan 4, 2005

From Robin.Barker@npl.co.uk

32660.gz

@p5pRT
Copy link
Author

p5pRT commented Jan 4, 2005

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jan 4, 2005

From @Tux

On Tue 04 Jan 2005 13​:32, Robin Barker <Robin.Barker@​npl.co.uk> wrote​:

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

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

@p5pRT
Copy link
Author

p5pRT commented Jan 4, 2005

From @Tux

Solved in fix 23742

@p5pRT p5pRT closed this as completed Jan 4, 2005
@p5pRT
Copy link
Author

p5pRT commented Jan 4, 2005

@Tux - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant