Closed p5pRT closed 19 years ago
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);
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.
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);
The RT System itself - Status changed from 'new' to 'open'
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
Solved in fix 23742
@tux - Status changed from 'open' to 'resolved'
Migrated from rt.perl.org#32660 (status was 'resolved')
Searchable as RT32660$