shafferj-zookeeper_client 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,7 @@ struct zk_rb_data {
20
20
  clientid_t myid;
21
21
  };
22
22
 
23
- static void watcher(zhandle_t *zh, int type, int state, const char *path) {
23
+ static void watcher(zhandle_t *zh, int type, int state, const char *path, void* context) {
24
24
  VALUE self, watcher_id;
25
25
 
26
26
  return; // watchers don't work in ruby yet
@@ -76,7 +76,7 @@ static VALUE method_initialize(VALUE self, VALUE hostPort) {
76
76
 
77
77
  data = Data_Make_Struct(ZooKeeper, struct zk_rb_data, 0, free_zk_rb_data, zk);
78
78
 
79
- zoo_set_debug_level(LOG_LEVEL_INFO);
79
+ zoo_set_debug_level(ZOO_LOG_LEVEL_INFO);
80
80
  zoo_deterministic_conn_order(0);
81
81
  zk->zh = zookeeper_init(RSTRING(hostPort)->ptr, watcher, 10000, &zk->myid, (void*)self, 0);
82
82
  if (!zk->zh) {
@@ -128,7 +128,7 @@ static VALUE method_create(VALUE self, VALUE path, VALUE value, VALUE flags) {
128
128
  Data_Get_Struct(rb_iv_get(self, "@data"), struct zk_rb_data, zk);
129
129
 
130
130
  check_errors(zoo_create(zk->zh, RSTRING(path)->ptr, RSTRING(value)->ptr, RSTRING(value)->len,
131
- &OPEN_ACL_UNSAFE, FIX2INT(flags), realpath, 10240));
131
+ &ZOO_OPEN_ACL_UNSAFE, FIX2INT(flags), realpath, 10240));
132
132
 
133
133
  return rb_str_new2(realpath);
134
134
  }
@@ -188,11 +188,11 @@ void Init_zookeeper_c() {
188
188
  eNoNode = rb_define_class_under(ZooKeeper, "NoNodeError", rb_eRuntimeError);
189
189
  eBadVersion = rb_define_class_under(ZooKeeper, "BadVersionError", rb_eRuntimeError);
190
190
 
191
- rb_define_const(ZooKeeper, "EPHEMERAL", INT2FIX(EPHEMERAL));
192
- rb_define_const(ZooKeeper, "SEQUENCE", INT2FIX(SEQUENCE));
191
+ rb_define_const(ZooKeeper, "EPHEMERAL", INT2FIX(ZOO_EPHEMERAL));
192
+ rb_define_const(ZooKeeper, "SEQUENCE", INT2FIX(ZOO_SEQUENCE));
193
193
 
194
- rb_define_const(ZooKeeper, "SESSION_EVENT", INT2FIX(SESSION_EVENT));
195
- rb_define_const(ZooKeeper, "CONNECTED_STATE", INT2FIX(CONNECTED_STATE));
196
- rb_define_const(ZooKeeper, "AUTH_FAILED_STATE", INT2FIX(AUTH_FAILED_STATE));
197
- rb_define_const(ZooKeeper, "EXPIRED_SESSION_STATE", INT2FIX(EXPIRED_SESSION_STATE));
194
+ rb_define_const(ZooKeeper, "SESSION_EVENT", INT2FIX(ZOO_SESSION_EVENT));
195
+ rb_define_const(ZooKeeper, "CONNECTED_STATE", INT2FIX(ZOO_CONNECTED_STATE));
196
+ rb_define_const(ZooKeeper, "AUTH_FAILED_STATE", INT2FIX(ZOO_AUTH_FAILED_STATE));
197
+ rb_define_const(ZooKeeper, "EXPIRED_SESSION_STATE", INT2FIX(ZOO_EXPIRED_SESSION_STATE));
198
198
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shafferj-zookeeper_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phillip Pearson