ruby-lsapi 1.9 → 1.10

Sign up to get free protection for your applications and to get access to all the features.
data/ext/lsapi/lsapilib.c CHANGED
@@ -758,6 +758,8 @@ int LSAPI_ReqBodyGetLine_r( LSAPI_Request * pReq, char * pBuf, int bufLen, int *
758
758
  int left;
759
759
  char * pBufEnd = pBuf + bufLen - 1;
760
760
  char * pBufCur = pBuf;
761
+ char * pCur;
762
+ char * p;
761
763
  if (!pReq || ( !pBuf )||(bufLen < 0 )|| !getLF )
762
764
  return -1;
763
765
  *getLF = 0;
@@ -775,8 +777,8 @@ int LSAPI_ReqBodyGetLine_r( LSAPI_Request * pReq, char * pBuf, int bufLen, int *
775
777
  }
776
778
  if ( len > left )
777
779
  len = left;
778
- char * pCur = pReq->m_pReqBuf + pReq->m_bufProcessed;
779
- char * p = memchr( pCur, '\n', len );
780
+ pCur = pReq->m_pReqBuf + pReq->m_bufProcessed;
781
+ p = memchr( pCur, '\n', len );
780
782
  if ( p )
781
783
  len = p - pCur + 1;
782
784
  memmove( pBufCur, pCur, len );
data/ext/lsapi/lsruby.c CHANGED
@@ -741,6 +741,10 @@ void Init_lsapi()
741
741
  orig_env = rb_const_get( rb_cObject, rb_intern("ENV") );
742
742
 
743
743
  env_copy = rb_funcall( orig_env, rb_intern( "to_hash" ), 0 );
744
+
745
+ //tell the garbage collector it is a global variable, do not recycle it.
746
+ rb_global_variable(&env_copy);
747
+
744
748
  //Do not need those environments after initialization
745
749
  remove_env = rb_str_new( "RAILS_ROOT", 10 );
746
750
  rb_funcall( env_copy, rb_intern( "delete" ), 1, remove_env );
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: ruby-lsapi
5
5
  version: !ruby/object:Gem::Version
6
- version: "1.9"
7
- date: 2006-09-25 00:00:00 -04:00
6
+ version: "1.10"
7
+ date: 2006-09-28 00:00:00 -04:00
8
8
  summary: A ruby extension for fast communication with LiteSpeed Web Server.
9
9
  require_paths:
10
10
  - lib