perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: modperl-2.0/xs/maps apr_functions.map
Date Tue, 13 Mar 2001 05:25:12 GMT
dougm       01/03/12 21:25:12

  Modified:    xs/maps  apr_functions.map
  Added:       xs/APR/Socket APR__Socket.h
  Log:
  add wrappers for apr_{recv,send}
  
  Revision  Changes    Path
  1.1                  modperl-2.0/xs/APR/Socket/APR__Socket.h
  
  Index: APR__Socket.h
  ===================================================================
  static MP_INLINE apr_status_t mpxs_apr_recv(pTHX_ apr_socket_t *socket,
                                              SV *sv_buf, SV *sv_len)
  {
      apr_status_t status;
      apr_size_t len = mp_xs_sv2_apr_size_t(sv_len);
  
      mpxs_sv_grow(sv_buf, len);
      status = apr_recv(socket, SvPVX(sv_buf), &len);
      mpxs_sv_cur_set(sv_buf, len);
  
      if (!SvREADONLY(sv_len)) {
          sv_setiv(sv_len, len);
      }
  
      return status;
  }
  
  static MP_INLINE apr_status_t mpxs_apr_send(pTHX_ apr_socket_t *socket,
                                              SV *sv_buf, SV *sv_len)
  {
      apr_status_t status;
      apr_size_t buf_len;
      char *buffer = SvPV(sv_buf, buf_len);
  
      if (sv_len) {
          buf_len = SvIV(sv_len);
      }
  
      status = apr_send(socket, buffer, &buf_len);
  
      if (sv_len && !SvREADONLY(sv_len)) {
          sv_setiv(sv_len, buf_len);
      }
  
      return status;
  }
  
  
  
  1.3       +2 -2      modperl-2.0/xs/maps/apr_functions.map
  
  Index: apr_functions.map
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/maps/apr_functions.map,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- apr_functions.map	2001/03/13 01:53:30	1.2
  +++ apr_functions.map	2001/03/13 05:25:11	1.3
  @@ -36,9 +36,9 @@
   !apr_accept
    apr_listen
    apr_connect
  - apr_recv
  + apr_recv | mpxs_ | sock, SV *:buf, SV *:len
    apr_recvfrom
  - apr_send
  + apr_send | mpxs_ | sock, SV *:buf, SV *:len=Nullsv
    apr_sendto
    apr_shutdown
   
  
  
  

Mime
View raw message