diff --git a/compress.cc b/compress.cc index 5a72f33..e9c5359 100644 --- a/compress.cc +++ b/compress.cc @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include @@ -11,7 +11,7 @@ using namespace v8; using namespace node; -class Gzip : public EventEmitter { +class Gzip : public ObjectWrap { public: static void Initialize (v8::Handle target) @@ -20,7 +20,6 @@ class Gzip : public EventEmitter { Local t = FunctionTemplate::New(New); - t->Inherit(EventEmitter::constructor_template); t->InstanceTemplate()->SetInternalFieldCount(1); NODE_SET_PROTOTYPE_METHOD(t, "init", GzipInit); @@ -195,7 +194,7 @@ class Gzip : public EventEmitter { } - Gzip () : EventEmitter () + Gzip () : ObjectWrap () { } @@ -209,7 +208,7 @@ class Gzip : public EventEmitter { }; -class Gunzip : public EventEmitter { +class Gunzip : public ObjectWrap { public: static void Initialize (v8::Handle target) @@ -218,7 +217,6 @@ class Gunzip : public EventEmitter { Local t = FunctionTemplate::New(New); - t->Inherit(EventEmitter::constructor_template); t->InstanceTemplate()->SetInternalFieldCount(1); NODE_SET_PROTOTYPE_METHOD(t, "init", GunzipInit); @@ -354,7 +352,7 @@ class Gunzip : public EventEmitter { return scope.Close(String::New("")); } - Gunzip () : EventEmitter () + Gunzip () : ObjectWrap () { }