Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix compatibility with node v0.5.2+

  • Loading branch information...
commit 6679c0d88676d73cabfa762c5908c31d234b16f3 1 parent 351983a
@yannickcr yannickcr authored
Showing with 4 additions and 5 deletions.
  1. +2 −3 src/bindings.cc
  2. +1 −1  src/bindings.h
  3. +1 −1  src/node_inotify.h
View
5 src/bindings.cc
@@ -20,7 +20,6 @@ namespace NodeInotify {
void Inotify::Initialize(Handle<Object> target) {
Local<FunctionTemplate> t = FunctionTemplate::New(Inotify::New);
- t->Inherit(EventEmitter::constructor_template);
t->InstanceTemplate()->SetInternalFieldCount(1);
NODE_SET_PROTOTYPE_METHOD(t, "addWatch",
@@ -79,13 +78,13 @@ namespace NodeInotify {
target->Set(String::NewSymbol("Inotify"), t->GetFunction());
}
- Inotify::Inotify() : EventEmitter() {
+ Inotify::Inotify() : ObjectWrap() {
ev_init(&read_watcher, Inotify::Callback);
read_watcher.data = this; //preserving my reference to use it inside Inotify::Callback
persistent = true;
}
- Inotify::Inotify(bool nonpersistent) : EventEmitter() {
+ Inotify::Inotify(bool nonpersistent) : ObjectWrap() {
ev_init(&read_watcher, Inotify::Callback);
read_watcher.data = this; //preserving my reference to use it inside Inotify::Callback
persistent = nonpersistent;
View
2  src/bindings.h
@@ -5,7 +5,7 @@
namespace NodeInotify {
- class Inotify : public EventEmitter {
+ class Inotify : public ObjectWrap {
public:
static void Initialize(Handle<Object> target);
View
2  src/node_inotify.h
@@ -3,7 +3,7 @@
#define SRC_NODE_INOTIFY_H_
#include <node.h>
-#include <node_events.h>
+#include <node_object_wrap.h>
#include <sys/inotify.h>
#include <sys/select.h>
#include <errno.h>
Please sign in to comment.
Something went wrong with that request. Please try again.