You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2002/03/20 05:52:33 UTC

[patch] adding the 'double' typemap

I think this is the most suitable place to add the typemap for 'double'. 
Is that correct? I'm just writing a function that returns double.

Index: xs/maps/apache_types.map
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/maps/apache_types.map,v
retrieving revision 1.6
diff -u -r1.6 apache_types.map
--- xs/maps/apache_types.map	10 Sep 2001 06:42:51 -0000	1.6
+++ xs/maps/apache_types.map	20 Mar 2002 04:50:26 -0000
@@ -50,6 +50,7 @@
  long int        | IV
  unsigned long   | UV
  unsigned        | UV
+double          | NV

  char *                   | PV
  const char *             | PV


_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [patch] adding the 'double' typemap

Posted by Doug MacEachern <do...@covalent.net>.
On Mon, 25 Mar 2002, Stas Bekman wrote:

> unknown typemap: 'double' at 
> /home/stas/apache.org/mp-sb/lib/ModPerl/TypeMap.pm line 229.

oh, right.  +1 on your patch.  i didn't notice at first it was for 
apache_types.map, not the 'typemap' file.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [patch] adding the 'double' typemap

Posted by Stas Bekman <st...@stason.org>.
Doug MacEachern wrote:
> On Wed, 20 Mar 2002, Stas Bekman wrote:
> 
> 
>>I think this is the most suitable place to add the typemap for 'double'. 
>>Is that correct? I'm just writing a function that returns double.
> 
> 
> ?  'double' is already in the default perl lib/ExtUtils/typemap.

It doesn't work if you use it in the map file.

Consider a macro:

#define mpxs_Apache__Foo_bar(x, y) pow(x, y)

and then in the map file:

  double:DEFINE_bar | | double:x, double:y

during xs_generate it cannot resolve 'double':

unknown typemap: 'double' at 
/home/stas/apache.org/mp-sb/lib/ModPerl/TypeMap.pm line 229.

-- 


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [patch] adding the 'double' typemap

Posted by Doug MacEachern <do...@covalent.net>.
On Wed, 20 Mar 2002, Stas Bekman wrote:

> I think this is the most suitable place to add the typemap for 'double'. 
> Is that correct? I'm just writing a function that returns double.

?  'double' is already in the default perl lib/ExtUtils/typemap.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org