Commits

Nikhil Marathe  committed 6b676cb

Changed non-static, non v8 Parse(Complete) return types to void

  • Participants
  • Parent commits e897b65

Comments (0)

Files changed (2)

 Handle::~Handle()
 {
     yajl_free( yc_handle );
+    yc_handle = NULL;
 }
 
 v8::Handle<Value> Handle::Parse( const Arguments& args )
     HandleScope scope;
     Handle *yh = Unwrap<Handle>( args.This() );
     yh->ParseComplete();
+    return Null();
 }
 
-v8::Handle<Value> Handle::Parse( unsigned char* str, int len )
+void Handle::Parse( unsigned char* str, int len )
 {
     int status = yajl_parse( yc_handle, str, len );
     if( status != yajl_status_ok
     }
 }
 
-v8::Handle<Value> Handle::ParseComplete()
+void Handle::ParseComplete()
 {
-    int status = yajl_parse_complete( yc_handle );
+    yajl_status status = yajl_parse_complete( yc_handle );
     if( status != yajl_status_ok
         && status != yajl_status_insufficient_data )
     {
     ~Handle();
 
   private:
-    v8::Handle<v8::Value> Parse( unsigned char*, int );
-    v8::Handle<v8::Value> ParseComplete();
+    void Parse( unsigned char*, int );
+    void ParseComplete();
     yajl_handle yc_handle;
     yajl_callbacks callbacks;
 };