httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject cvs commit: httpd-apreq-2/t cookie.c
Date Sat, 07 Jun 2003 20:16:23 GMT
joes        2003/06/07 13:16:23

  Modified:    build    xsbuilder.pl
               t        cookie.c
  Log:
  Add filler (unused?) typemaps; fix cookie test to reflect removal of version argument from
apreq_make_cookie.
  
  Revision  Changes    Path
  1.4       +52 -4     httpd-apreq-2/build/xsbuilder.pl
  
  Index: xsbuilder.pl
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/build/xsbuilder.pl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- xsbuilder.pl	30 May 2003 21:43:32 -0000	1.3
  +++ xsbuilder.pl	7 Jun 2003 20:16:23 -0000	1.4
  @@ -189,6 +189,46 @@
   
   }
   
  +# another bug in WrapXS.pm - 
  +# must insert a space before typemap definition
  +
  +sub write_typemap
  +{
  +    my $self = shift;
  +    my $typemap = $self->typemap;
  +    my $map = $typemap->get;
  +    my %seen;
  +
  +    my $fh = $self->open_class_file('', 'typemap');
  +    print $fh "$self->{noedit_warning_hash}\n";
  +
  +    while (my($type, $t) = each %$map) {
  +        my $class = $t -> {class} ;
  +        $class ||= $type;
  +        next if $seen{$type}++ || $typemap->special($class);
  +
  +        my $typemap = $t -> {typemapid} ;
  +        if ($class =~ /::/) {
  +            next if $seen{$class}++ ;
  +            $class =~ s/::$// ;
  +            print $fh "$class\t$typemap\n";
  +        }
  +        else {
  +            print $fh "$type\t$typemap\n";
  +        }
  +    }
  +
  +    my $typemap_code = $typemap -> typemap_code ;
  +
  +    foreach my $dir ('INPUT', 'OUTPUT') {
  +        print $fh "\n$dir\n" ;
  +        while (my($type, $code) = each %{$typemap_code}) {
  +            print $fh "$type\n\t$code->{$dir}\n\n" if ($code->{$dir}) ;
  +        }
  +    }
  +
  +    close $fh;
  +}
   
   package My::TypeMap;
   use base 'ExtUtils::XSBuilder::TypeMap';
  @@ -198,20 +238,28 @@
   {
       {
           T_APREQ_COOKIE  => {
  -                            OUTPUT => '$arg = apreq_xs_cookie2sv($var)',
                               INPUT  => '$var = apreq_xs_sv2cookie($arg)',
  +                            perl2c => 'apreq_xs_sv2cookie(sv)',
  +                            OUTPUT => '$arg = apreq_xs_cookie2sv($var,apreq_xs_class);',
  +                            c2perl => 'apreq_xs_cookie2sv(ptr,apreq_xs_class);',
                              },
           T_APREQ_PARAM   => {
  -                            OUTPUT => '$arg = apreq_xs_param2sv($var)',
                               INPUT  => '$var = apreq_xs_sv2param($arg)',
  +                            perl2c => 'apreq_xs_sv2param(sv)',
  +                            OUTPUT => '$arg = apreq_xs_param2sv($var,apreq_xs_class);',
  +                            c2perl => 'apreq_xs_param2sv(ptr,apreq_xs_class)',
                              },
           T_APREQ_REQUEST => {
  -                            OUTPUT => '$arg = apreq_xs_request2sv($var)',
                               INPUT  => '$var = apreq_xs_sv2request($arg)',
  +                            perl2c => 'apreq_xs_sv2request(sv)',
  +                            OUTPUT => '$arg = apreq_xs_request2sv($var,apreq_xs_class);',
  +                            c2perl => 'apreq_xs_request2sv(ptr,apreq_xs_class)',
                              },
           T_APREQ_JAR     => {
  -                            OUTPUT => '$arg = apreq_xs_jar2sv($var)',
                               INPUT  => '$var = apreq_xs_sv2jar($arg)',
  +                            perl2c => 'apreq_xs_sv2jar(sv)',
  +                            OUTPUT => '$arg = apreq_xs_jar2sv($var,apreq_xs_class);',
  +                            c2perl => 'apreq_xs_jar2sv(ptr,apreq_xs_class)',
                              },
       }
   }
  
  
  
  1.5       +3 -2      httpd-apreq-2/t/cookie.c
  
  Index: cookie.c
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/t/cookie.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- cookie.c	20 May 2003 20:27:32 -0000	1.4
  +++ cookie.c	7 Jun 2003 20:16:23 -0000	1.5
  @@ -117,12 +117,13 @@
   
   static void rfc_cookie(CuTest *tc)
   {
  -    apreq_cookie_t *c = apreq_make_cookie(p,RFC,"rfc",3,"out",3);
  +    apreq_cookie_t *c = apreq_make_cookie(p,"rfc",3,"out",3);
       apreq_cookie_version_t version = RFC;
       long expires = apreq_atoi64t("+3m");
   
       CuAssertStrEquals(tc,"out",apreq_cookie_value(c));
  -    CuAssertIntEquals(tc, version,c->version);
  +    c->version = version;
  +    c->time.max_age = -1;
   
       CuAssertStrEquals(tc,"rfc=out; Version=1", apreq_cookie_as_string(p,c));
       c->domain = apr_pstrdup(p, "example.com");
  
  
  

Mime
View raw message