memcached 0.6 → 0.7

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.
data.tar.gz.sig CHANGED
Binary file
@@ -0,0 +1,101 @@
1
+
2
+ Here are some benchmarks for various architectures and operating systems.
3
+
4
+ You can easily run your own benchmarks, as long as you have memcached itself on your system:
5
+ $ ruby -e 'system("ruby #{File.dirname(`gem which memcached`.split("\n").
6
+ last)}/../test/profile/benchmark.rb")'
7
+
8
+ == x86-32 OS X
9
+
10
+ These benchmarks were run on 32-bit Intel OS X 10.4:
11
+
12
+ user system total real
13
+ set:plain:noblock:memcached 0.140000 0.010000 0.150000 ( 0.511496)
14
+ set:plain:memcached 0.300000 0.330000 0.630000 ( 1.885052)
15
+ set:plain:memcache-client 47.900000 1.320000 49.220000 ( 65.757080)
16
+ set:ruby:noblock:memcached 0.240000 0.010000 0.250000 ( 0.721554)
17
+ set:ruby:memcached 0.400000 0.300000 0.700000 ( 2.206571)
18
+ set:ruby:caffeine 6.150000 0.910000 7.060000 ( 11.954644)
19
+ set:ruby:memcache-client 47.450000 1.260000 48.710000 ( 62.016943)
20
+ get:plain:memcached 0.360000 0.310000 0.670000 ( 2.232519)
21
+ get:plain:memcache-client 47.010000 1.000000 48.010000 ( 54.759212)
22
+ get:ruby:memcached 0.380000 0.320000 0.700000 ( 1.681682)
23
+ get:ruby:caffeine 5.780000 0.920000 6.700000 ( 9.658255)
24
+ get:ruby:memcache-client 47.820000 1.250000 49.070000 ( 67.857959)
25
+ missing:ruby:memcached 0.760000 0.360000 1.120000 ( 2.500735)
26
+ missing:ruby:caffeine 5.510000 0.900000 6.410000 ( 9.652409)
27
+ missing:ruby:memcache-client 47.100000 1.180000 48.280000 ( 63.901434)
28
+ mixed:ruby:noblock:memcached 0.810000 0.690000 1.500000 ( 4.270386)
29
+ mixed:ruby:memcached 0.820000 0.660000 1.480000 ( 4.272916)
30
+ mixed:ruby:caffeine 10.590000 1.850000 12.440000 ( 20.338369)
31
+ mixed:ruby:memcache-client 95.730000 2.400000 98.130000 (121.600738)
32
+ hash:fnv1_32:memcached 1.310000 1.330000 2.640000 ( 8.634078)
33
+ hash:fnv1_64:memcached 1.390000 1.340000 2.730000 ( 9.794876)
34
+ hash:md5:memcached 1.460000 1.300000 2.760000 ( 9.080550)
35
+ hash:hsieh:memcached 1.310000 1.350000 2.660000 ( 7.182591)
36
+ hash:ketama:memcached 1.470000 1.260000 2.730000 ( 7.366949)
37
+ hash:fnv1a_32:memcached 1.290000 1.350000 2.640000 ( 7.134969)
38
+ hash:default:memcached 1.360000 1.350000 2.710000 ( 8.464221)
39
+ hash:fnv1a_64:memcached 1.350000 1.290000 2.640000 ( 10.121386)
40
+ hash:crc:memcached 1.370000 1.210000 2.580000 ( 9.665065)
41
+
42
+
43
+ == x86-64 Linux
44
+
45
+ These benchmarks were run on AMD64 RHEL4:
46
+
47
+ user system total real
48
+ set:plain:noblock:memcached 0.120000 0.010000 0.130000 ( 3.700668)
49
+ set:plain:memcached 0.200000 0.190000 0.390000 ( 0.787187)
50
+ set:plain:memcache-client 13.860000 0.210000 14.070000 ( 14.562234)
51
+ set:ruby:noblock:memcached 0.190000 0.010000 0.200000 ( 5.347384)
52
+ set:ruby:memcached 0.290000 0.150000 0.440000 ( 0.884206)
53
+ set:ruby:memcache-client 13.980000 0.200000 14.180000 ( 14.752663)
54
+ get:plain:memcached 0.270000 0.170000 0.440000 ( 0.745219)
55
+ get:plain:memcache-client 14.070000 0.210000 14.280000 ( 14.794583)
56
+ get:ruby:memcached 0.370000 0.180000 0.550000 ( 0.910926)
57
+ get:ruby:memcache-client 14.120000 0.220000 14.340000 ( 14.921784)
58
+ missing:ruby:memcached 0.550000 0.180000 0.730000 ( 1.111790)
59
+ missing:ruby:memcache-client 13.600000 0.220000 13.820000 ( 14.427924)
60
+ mixed:ruby:noblock:memcached 0.560000 0.300000 0.860000 ( 1.496428)
61
+ mixed:ruby:memcached 0.620000 0.370000 0.990000 ( 1.654926)
62
+ mixed:ruby:memcache-client 27.580000 0.410000 27.990000 ( 28.854146)
63
+ hash:fnv1a_64:memcached 0.980000 0.740000 1.720000 ( 3.162248)
64
+ hash:fnv1_32:memcached 0.990000 0.710000 1.700000 ( 3.008045)
65
+ hash:fnv1_64:memcached 0.990000 0.710000 1.700000 ( 3.018584)
66
+ hash:default:memcached 1.060000 0.680000 1.740000 ( 3.094764)
67
+ hash:crc:memcached 0.980000 0.640000 1.620000 ( 3.219268)
68
+ hash:hsieh:memcached 0.950000 0.770000 1.720000 ( 3.328382)
69
+ hash:ketama:memcached 1.000000 0.770000 1.770000 ( 3.120591)
70
+ hash:md5:memcached 0.990000 0.750000 1.740000 ( 3.076737)
71
+ hash:fnv1a_32:memcached 0.950000 0.750000 1.700000 ( 2.973986)
72
+
73
+ == x86-64 Linux/Xen
74
+
75
+ These benchmarks were run on AMD64 Ubuntu 6.0.6 as a Xen guest:
76
+
77
+ user system total real
78
+ set:plain:noblock:memcached 0.090000 0.100000 0.190000 ( 0.767657)
79
+ set:plain:memcached 0.120000 0.200000 0.320000 ( 1.480487)
80
+ set:plain:memcache-client 18.620000 11.380000 30.000000 ( 32.116703)
81
+ set:ruby:noblock:memcached 0.220000 0.050000 0.270000 ( 0.296509)
82
+ set:ruby:memcached 0.150000 0.210000 0.360000 ( 1.345469)
83
+ set:ruby:memcache-client 19.310000 11.750000 31.060000 ( 32.858902)
84
+ get:plain:memcached 0.120000 0.130000 0.250000 ( 1.291883)
85
+ get:plain:memcache-client 19.580000 11.930000 31.510000 ( 32.982464)
86
+ get:ruby:memcached 0.120000 0.160000 0.280000 ( 1.404061)
87
+ get:ruby:memcache-client 19.520000 11.740000 31.260000 ( 33.537986)
88
+ missing:ruby:memcached 0.440000 0.240000 0.680000 ( 1.527592)
89
+ missing:ruby:memcache-client 19.030000 11.760000 30.790000 ( 31.800959)
90
+ mixed:ruby:noblock:memcached 0.100000 0.080000 0.180000 (100.035915)
91
+ mixed:ruby:memcached 0.380000 0.380000 0.760000 ( 2.728911)
92
+ mixed:ruby:memcache-client 38.890000 23.740000 62.630000 ( 66.185559)
93
+ hash:hsieh:memcached 0.440000 0.680000 1.120000 ( 5.119760)
94
+ hash:crc:memcached 0.410000 0.810000 1.220000 ( 5.378614)
95
+ hash:md5:memcached 0.430000 0.710000 1.140000 ( 5.410604)
96
+ hash:ketama:memcached 0.770000 0.850000 1.620000 ( 5.379337)
97
+ hash:fnv1a_32:memcached 0.300000 0.650000 0.950000 ( 5.110063)
98
+ hash:default:memcached 0.220000 0.530000 0.750000 ( 5.183058)
99
+ hash:fnv1a_64:memcached 0.300000 0.550000 0.850000 ( 5.152530)
100
+ hash:fnv1_32:memcached 0.360000 0.770000 1.130000 ( 5.150417)
101
+ hash:fnv1_64:memcached 0.510000 0.650000 1.160000 ( 5.038078)
data/CHANGELOG CHANGED
@@ -1,4 +1,6 @@
1
1
 
2
+ v0.7. Rails compatibility wrapper; real multiget; rescue UnknownReadFailure in Interlock::Rails#get.
3
+
2
4
  v0.6. Better documentation; benchmark suite; improve buffered IO API; remove namespace accessor in favor of generic options hash; patch up extconf.rb to handle unusual library situations; increase test coverage.
3
5
 
4
6
  v0.5. First release.
@@ -0,0 +1,9 @@
1
+
2
+ == Compatibility chart
3
+
4
+ This chart shows which versions of the Ruby library are compatible with which versions of libmemcached.
5
+
6
+ <b>Library version</b>:: <b>libmemcached version</b>
7
+ 0.7:: 0.15
8
+ 0.6:: 0.13
9
+ 0.5:: 0.13
data/Manifest CHANGED
@@ -1,21 +1,25 @@
1
+ BENCHMARKS
1
2
  CHANGELOG
3
+ COMPATIBILITY
2
4
  ext/extconf.rb
3
- ext/libmemcached.i
4
- ext/libmemcached_wrap.c
5
+ ext/rlibmemcached.i
6
+ ext/rlibmemcached_wrap.c
5
7
  lib/memcached/behaviors.rb
6
8
  lib/memcached/exceptions.rb
7
9
  lib/memcached/integer.rb
8
10
  lib/memcached/memcached.rb
11
+ lib/memcached/rails.rb
9
12
  lib/memcached.rb
10
13
  LICENSE
11
14
  Manifest
12
15
  README
13
- test/benchmark/benchmark.rb
14
- test/benchmark/benchmark_set_get.rb
15
- test/benchmark/profile.rb
16
+ test/profile/benchmark.rb
17
+ test/profile/profile.rb
18
+ test/profile/valgrind.rb
16
19
  test/setup.rb
17
20
  test/teardown.rb
18
21
  test/test_helper.rb
19
22
  test/unit/binding_test.rb
20
23
  test/unit/memcached_test.rb
24
+ test/unit/rails_test.rb
21
25
  TODO
data/README CHANGED
@@ -9,7 +9,7 @@ Copyright 2008 Cloudburst, LLC. Licensed under the AFL 3. See the included LICEN
9
9
 
10
10
  The public certificate for this gem is here[http://rubyforge.org/frs/download.php/25331/evan_weaver-original-public_cert.pem].
11
11
 
12
- If you like this software, please {make a donation}[http://blog.evanweaver.com/donate/], or {recommend Evan}[http://www.workingwithrails.com/person/7739-evan-weaver] at Working with Rails.
12
+ If you use this software, please {make a donation}[http://blog.evanweaver.com/donate/], or {recommend Evan}[http://www.workingwithrails.com/person/7739-evan-weaver] at Working with Rails.
13
13
 
14
14
  == Features
15
15
 
@@ -18,13 +18,13 @@ If you like this software, please {make a donation}[http://blog.evanweaver.com/d
18
18
  * multiple hashing modes, including consistent hashing
19
19
  * ludicrous speed, including optional non-blocking IO
20
20
 
21
- The <b>memcached</b> library wraps the pure-C libmemcached client via SWIG. Both libraries are very new; use caution.
21
+ The <b>memcached</b> library wraps the pure-C libmemcached client via SWIG.
22
22
 
23
23
  == Installation
24
24
 
25
- You need {libmemcached 0.13}[http://tangent.org/552/libmemcached.html]. Other versions of libmemcached are not supported. You also need {memcached itself}[http://www.danga.com/memcached/] if you want to test against a local server.
25
+ You need {libmemcached 0.15}[http://tangent.org/552/libmemcached.html]. Other versions of libmemcached are not supported. You also need {memcached itself}[http://www.danga.com/memcached/] if you want to test against a local server.
26
26
 
27
- Download and extract the {libmemcached tarball}[http://download.tangent.org/libmemcached-0.13.tar.gz]. Then for Linux, run:
27
+ Download and extract the {libmemcached tarball}[http://download.tangent.org/libmemcached-0.15.tar.gz]. Then for Linux, run:
28
28
  ./configure
29
29
  make && sudo make install
30
30
 
@@ -83,7 +83,11 @@ Note that the API is not the same as that of <b>Ruby-MemCache</b> or <b>memcache
83
83
  $cache.delete 'test'
84
84
  $cache.get 'test' #=> raises Memcached::NotFound
85
85
 
86
- A compatibility wrapper for legacy applications is in progress.
86
+ == Legacy applications
87
+
88
+ There is a compatibility wrapper for legacy applications called Memcached::Rails.
89
+
90
+ The easiest way to use it in your app is by installing Interlock[http://blog.evanweaver.com/files/doc/fauna/interlock] and setting <tt>client: memcached</tt> in <tt>config/memcached.yml</tt>. This gives you memcached fragments by default. You do not have to use the other Interlock features unless you want to.
87
91
 
88
92
  == Threading
89
93
 
@@ -95,33 +99,17 @@ A compatibility wrapper for legacy applications is in progress.
95
99
  cache.set 'example', 1
96
100
  cache.get 'example'
97
101
  # ...
102
+ cache.destroy
98
103
  end
99
104
 
100
105
  # Join the thread so that exceptions don't get lost
101
106
  thread.join
107
+
108
+ Make sure to call Memcached#destroy before your thread exits or you will leak memory.
102
109
 
103
110
  == Benchmarks
104
111
 
105
- <b>memcached</b> is much, much faster than <b>memcache-client</b>:
106
-
107
- user system total real
108
- set:ruby:noblock:memcached 0.050000 0.000000 0.050000 ( 0.054205)
109
- set:ruby:memcached 0.130000 0.160000 0.290000 ( 0.338529)
110
- set:ruby:memcache-client 3.690000 0.130000 3.820000 ( 4.030806)
111
- ...
112
- get:ruby:memcached 0.110000 0.020000 0.130000 ( 0.316446)
113
- get:ruby:memcache-client 3.730000 0.120000 3.850000 ( 4.040446)
114
- ...
115
- missing:ruby:memcached 0.160000 0.090000 0.250000 ( 0.401891)
116
- missing:ruby:memcache-client 3.650000 0.090000 3.740000 ( 3.880192)
117
- ...
118
- mixed:ruby:noblock:memcached 0.190000 0.230000 0.420000 ( 0.667130)
119
- mixed:ruby:memcached 0.250000 0.250000 0.500000 ( 0.663093)
120
- mixed:ruby:memcache-client 7.410000 0.210000 7.620000 ( 7.942145)
121
-
122
- These benchmarks were run on x86-64 Linux. You can easily run your own benchmarks, as long as you have memcached itself on your system:
123
- $ ruby -e 'system("ruby #{File.dirname(`gem which memcached`.split("\n").
124
- last)}/../test/benchmark/benchmark.rb")'
112
+ <b>memcached</b> is up to 150x faster than <b>memcache-client</b>, and up to 15x faster than <b>caffeine</b>. See BENCHMARKS[link:files/BENCHMARKS.html] for details.
125
113
 
126
114
  == Reporting problems
127
115
 
data/TODO CHANGED
@@ -1,11 +1,4 @@
1
1
 
2
- Can happen any time:
2
+ * Verify libmemcached version
3
3
 
4
- * real multiget
5
- * look for memory leaks
6
-
7
- Waiting on libmemcached 0.14:
8
-
9
- * verify version
10
4
  * CAS support
11
- * passing missing increment/decrement tests
@@ -3,15 +3,19 @@ require 'mkmf'
3
3
 
4
4
  if ENV['SWIG']
5
5
  puts "running SWIG"
6
- $stdout.write `swig -I/opt/local/include -ruby -autorename libmemcached.i`
6
+ $stdout.write `swig -I/opt/local/include -ruby -autorename rlibmemcached.i`
7
7
  end
8
8
 
9
+ $CFLAGS.gsub! /-O\d/, ''
10
+
9
11
  if ENV['DEBUG']
10
12
  puts "setting debug flags"
11
- $CFLAGS << " -ggdb -DHAVE_DEBUG"
13
+ $CFLAGS << " -O0 -ggdb -DHAVE_DEBUG"
14
+ else
15
+ $CFLAGS << " -O3"
12
16
  end
13
17
 
14
- dir_config 'libmemcached'
18
+ dir_config 'rlibmemcached'
15
19
 
16
20
  # XXX There's probably a better way to do this
17
21
  unless find_library 'memcached', 'memcached_server_add', *ENV['LD_LIBRARY_PATH'].to_s.split(":")
@@ -21,4 +25,4 @@ unless find_header 'libmemcached/memcached.h', *ENV['INCLUDE_PATH'].to_s.split("
21
25
  raise "header file 'libmemcached/memcached.h' not found"
22
26
  end
23
27
 
24
- create_makefile 'libmemcached'
28
+ create_makefile 'rlibmemcached'
@@ -0,0 +1,156 @@
1
+ %module rlibmemcached
2
+ %{
3
+ #include <libmemcached/memcached.h>
4
+ %}
5
+
6
+ %warnfilter(SWIGWARN_RUBY_WRONG_NAME) memcached_st;
7
+ %warnfilter(SWIGWARN_RUBY_WRONG_NAME) memcached_server_st;
8
+ %warnfilter(SWIGWARN_RUBY_WRONG_NAME) memcached_stat_st;
9
+ %warnfilter(SWIGWARN_RUBY_WRONG_NAME) memcached_string_st;
10
+ %warnfilter(SWIGWARN_RUBY_WRONG_NAME) memcached_result_st;
11
+
12
+ %include "typemaps.i"
13
+
14
+ //// Input maps
15
+ %apply unsigned short { uint8_t };
16
+ %apply unsigned int { uint16_t };
17
+ %apply unsigned long { uint32_t flags, uint32_t offset };
18
+
19
+ // For behavior's weird set interface
20
+ %typemap(in) (void *data) {
21
+ int value = FIX2INT($input);
22
+ if (value == 0 || value == 1) {
23
+ $1 = (void *) value;
24
+ } else {
25
+ // Only pass by reference for :distribution and :hash
26
+ value = value - 2;
27
+ $1 = &value;
28
+ }
29
+ };
30
+
31
+ // Array of strings map for multiget
32
+ %typemap(in) (char **keys, size_t *key_length, unsigned int number_of_keys) {
33
+ int i;
34
+ Check_Type($input, T_ARRAY);
35
+ $3 = (unsigned int) RARRAY_LEN($input);
36
+ $2 = (size_t *) malloc(($3+1)*sizeof(size_t));
37
+ $1 = (char **) malloc(($3+1)*sizeof(char *));
38
+ for(i = 0; i < $3; i ++) {
39
+ $2[i] = strlen(StringValuePtr(RARRAY_PTR($input)[i]));
40
+ $1[i] = StringValuePtr(RARRAY_PTR($input)[i]);
41
+ }
42
+ }
43
+ %typemap(freearg) (char **keys, size_t *key_length, unsigned int number_of_keys) {
44
+ free($1);
45
+ free($2);
46
+ }
47
+
48
+ // Generic strings
49
+ %typemap(in) (char *str, size_t len) {
50
+ $1 = STR2CSTR($input);
51
+ $2 = (size_t) RSTRING($input)->len;
52
+ };
53
+
54
+ %apply (char *str, size_t len) {
55
+ (char *key, size_t key_length),
56
+ (char *value, size_t value_length)
57
+ };
58
+
59
+ //// Output maps
60
+ %apply unsigned short *OUTPUT {memcached_return *error}
61
+ %apply unsigned int *OUTPUT {uint32_t *flags}
62
+ %apply size_t *OUTPUT {size_t *value_length}
63
+ %apply unsigned long long *OUTPUT {uint64_t *value}
64
+
65
+ // String
66
+ %typemap(in, numinputs=0) (char *key, size_t *key_length) {
67
+ $1 = malloc(512*sizeof(char));
68
+ $2 = malloc(sizeof(size_t)); // XXX Could possibly be the address of a local
69
+ };
70
+ %typemap(argout) (char *key, size_t *key_length) {
71
+ if ($1 != NULL) {
72
+ rb_ary_push($result, rb_str_new($1, *$2));
73
+ free($1);
74
+ free($2);
75
+ }
76
+ }
77
+
78
+ // Array of strings
79
+ %typemap(out) (char **) {
80
+ int i;
81
+ VALUE ary = rb_ary_new();
82
+ $result = rb_ary_new();
83
+
84
+ for(i=0; $1[i] != NULL; i++) {
85
+ rb_ary_store(ary, i, rb_str_new2($1[i]));
86
+ }
87
+ rb_ary_push($result, ary);
88
+ free($1);
89
+ };
90
+
91
+ %include "/opt/local/include/libmemcached/memcached.h"
92
+
93
+ // Manual wrappers
94
+
95
+ // Single get. SWIG likes to use SWIG_FromCharPtr instead of SWIG_FromCharPtrAndSize because
96
+ // of the retval/argout split, so it truncates return values with \0 in them.
97
+ VALUE memcached_get_rvalue(memcached_st *ptr, char *key, size_t key_length, uint32_t *flags, memcached_return *error);
98
+ %{
99
+ VALUE memcached_get_rvalue(memcached_st *ptr, char *key, size_t key_length, uint32_t *flags, memcached_return *error) {
100
+ VALUE ret;
101
+ size_t value_length;
102
+ char *value = memcached_get(ptr, key, key_length, &value_length, flags, error);
103
+ ret = rb_str_new(value, value_length);
104
+ free(value);
105
+ return ret;
106
+ };
107
+ %}
108
+
109
+ // Multi get
110
+ VALUE memcached_fetch_rvalue(memcached_st *ptr, char *key, size_t *key_length, uint32_t *flags, memcached_return *error);
111
+ %{
112
+ VALUE memcached_fetch_rvalue(memcached_st *ptr, char *key, size_t *key_length, uint32_t *flags, memcached_return *error) {
113
+ size_t value_length;
114
+ VALUE result = rb_ary_new();
115
+
116
+ char *value = memcached_fetch(ptr, key, key_length, &value_length, flags, error);
117
+ if (value == NULL) {
118
+ rb_ary_push(result, Qnil);
119
+ } else {
120
+ VALUE ret = rb_str_new(value, value_length);
121
+ rb_ary_push(result, ret);
122
+ free(value);
123
+ }
124
+ return result;
125
+ };
126
+ %}
127
+
128
+ // We need to wrap this so it doesn't leak memory. SWIG doesn't want to automatically free. We could
129
+ // maybe use a 'ret' %typemap, but this is ok.
130
+ VALUE memcached_stat_get_rvalue(memcached_st *ptr, memcached_stat_st *stat, char *key, memcached_return *error);
131
+ %{
132
+ VALUE memcached_stat_get_rvalue(memcached_st *ptr, memcached_stat_st *stat, char *key, memcached_return *error) {
133
+ char *str;
134
+ VALUE ret;
135
+ str = memcached_stat_get_value(ptr, stat, key, error);
136
+ ret = rb_str_new2(str);
137
+ free(str);
138
+ return ret;
139
+ };
140
+ %}
141
+
142
+ // Ruby isn't aware that the pointer is an array... there is probably a better way to do this
143
+ memcached_server_st *memcached_select_server_at(memcached_st *in_ptr, int index);
144
+ %{
145
+ memcached_server_st *memcached_select_server_at(memcached_st *in_ptr, int index) {
146
+ return &(in_ptr->hosts[index]);
147
+ };
148
+ %}
149
+
150
+ // Same, but for stats
151
+ memcached_stat_st *memcached_select_stat_at(memcached_st *in_ptr, memcached_stat_st *stat_ptr, int index);
152
+ %{
153
+ memcached_stat_st *memcached_select_stat_at(memcached_st *in_ptr, memcached_stat_st *stat_ptr, int index) {
154
+ return &(stat_ptr[index]);
155
+ };
156
+ %}
@@ -1511,37 +1511,43 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
1511
1511
 
1512
1512
  #define SWIGTYPE_p_addrinfo swig_types[0]
1513
1513
  #define SWIGTYPE_p_char swig_types[1]
1514
- #define SWIGTYPE_p_int32_t swig_types[2]
1515
- #define SWIGTYPE_p_memcached_allocated swig_types[3]
1516
- #define SWIGTYPE_p_memcached_behavior swig_types[4]
1517
- #define SWIGTYPE_p_memcached_connection swig_types[5]
1518
- #define SWIGTYPE_p_memcached_hash swig_types[6]
1519
- #define SWIGTYPE_p_memcached_result_st swig_types[7]
1520
- #define SWIGTYPE_p_memcached_return swig_types[8]
1521
- #define SWIGTYPE_p_memcached_server_distribution swig_types[9]
1522
- #define SWIGTYPE_p_memcached_server_st swig_types[10]
1523
- #define SWIGTYPE_p_memcached_st swig_types[11]
1524
- #define SWIGTYPE_p_memcached_stat_st swig_types[12]
1525
- #define SWIGTYPE_p_memcached_string_st swig_types[13]
1526
- #define SWIGTYPE_p_p_char swig_types[14]
1527
- #define SWIGTYPE_p_p_f_p_struct_memcached_st_p_struct_memcached_result_st_p_void__unsigned_int swig_types[15]
1528
- #define SWIGTYPE_p_size_t swig_types[16]
1529
- #define SWIGTYPE_p_time_t swig_types[17]
1530
- #define SWIGTYPE_p_uint32_t swig_types[18]
1531
- #define SWIGTYPE_p_uint64_t swig_types[19]
1532
- #define SWIGTYPE_p_unsigned_int swig_types[20]
1533
- #define SWIGTYPE_p_void swig_types[21]
1534
- static swig_type_info *swig_types[23];
1535
- static swig_module_info swig_module = {swig_types, 22, 0, 0, 0, 0};
1514
+ #define SWIGTYPE_p_f_p_struct_memcached_st__memcached_return swig_types[2]
1515
+ #define SWIGTYPE_p_f_p_struct_memcached_st_p_struct_memcached_st__memcached_return swig_types[3]
1516
+ #define SWIGTYPE_p_f_p_struct_memcached_st_p_void__void swig_types[4]
1517
+ #define SWIGTYPE_p_f_p_struct_memcached_st_p_void_q_const__size_t__p_void swig_types[5]
1518
+ #define SWIGTYPE_p_f_p_struct_memcached_st_q_const__size_t__p_void swig_types[6]
1519
+ #define SWIGTYPE_p_int32_t swig_types[7]
1520
+ #define SWIGTYPE_p_memcached_allocated swig_types[8]
1521
+ #define SWIGTYPE_p_memcached_behavior swig_types[9]
1522
+ #define SWIGTYPE_p_memcached_callback swig_types[10]
1523
+ #define SWIGTYPE_p_memcached_connection swig_types[11]
1524
+ #define SWIGTYPE_p_memcached_hash swig_types[12]
1525
+ #define SWIGTYPE_p_memcached_result_st swig_types[13]
1526
+ #define SWIGTYPE_p_memcached_return swig_types[14]
1527
+ #define SWIGTYPE_p_memcached_server_distribution swig_types[15]
1528
+ #define SWIGTYPE_p_memcached_server_st swig_types[16]
1529
+ #define SWIGTYPE_p_memcached_st swig_types[17]
1530
+ #define SWIGTYPE_p_memcached_stat_st swig_types[18]
1531
+ #define SWIGTYPE_p_memcached_string_st swig_types[19]
1532
+ #define SWIGTYPE_p_p_char swig_types[20]
1533
+ #define SWIGTYPE_p_p_f_p_struct_memcached_st_p_struct_memcached_result_st_p_void__unsigned_int swig_types[21]
1534
+ #define SWIGTYPE_p_size_t swig_types[22]
1535
+ #define SWIGTYPE_p_time_t swig_types[23]
1536
+ #define SWIGTYPE_p_uint32_t swig_types[24]
1537
+ #define SWIGTYPE_p_uint64_t swig_types[25]
1538
+ #define SWIGTYPE_p_unsigned_int swig_types[26]
1539
+ #define SWIGTYPE_p_void swig_types[27]
1540
+ static swig_type_info *swig_types[29];
1541
+ static swig_module_info swig_module = {swig_types, 28, 0, 0, 0, 0};
1536
1542
  #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1537
1543
  #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1538
1544
 
1539
1545
  /* -------- TYPES TABLE (END) -------- */
1540
1546
 
1541
- #define SWIG_init Init_libmemcached
1542
- #define SWIG_name "Libmemcached"
1547
+ #define SWIG_init Init_rlibmemcached
1548
+ #define SWIG_name "Rlibmemcached"
1543
1549
 
1544
- static VALUE mLibmemcached;
1550
+ static VALUE mRlibmemcached;
1545
1551
 
1546
1552
  #define SWIGVERSION 0x010329
1547
1553
 
@@ -1609,6 +1615,30 @@ SWIG_pchar_descriptor()
1609
1615
  }
1610
1616
 
1611
1617
 
1618
+ SWIGINTERNINLINE VALUE
1619
+ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
1620
+ {
1621
+ if (carray) {
1622
+ if (size > LONG_MAX) {
1623
+ swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
1624
+ return pchar_descriptor ?
1625
+ SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : Qnil;
1626
+ } else {
1627
+ return rb_str_new(carray, (long)(size));
1628
+ }
1629
+ } else {
1630
+ return Qnil;
1631
+ }
1632
+ }
1633
+
1634
+
1635
+ SWIGINTERNINLINE VALUE
1636
+ SWIG_FromCharPtr(const char *cptr)
1637
+ {
1638
+ return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
1639
+ }
1640
+
1641
+
1612
1642
  SWIGINTERN int
1613
1643
  SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
1614
1644
  {
@@ -1671,23 +1701,6 @@ SWIG_AsCharArray(VALUE obj, char *val, size_t size)
1671
1701
  }
1672
1702
 
1673
1703
 
1674
- SWIGINTERNINLINE VALUE
1675
- SWIG_FromCharPtrAndSize(const char* carray, size_t size)
1676
- {
1677
- if (carray) {
1678
- if (size > LONG_MAX) {
1679
- swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
1680
- return pchar_descriptor ?
1681
- SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : Qnil;
1682
- } else {
1683
- return rb_str_new(carray, (long)(size));
1684
- }
1685
- } else {
1686
- return Qnil;
1687
- }
1688
- }
1689
-
1690
-
1691
1704
  SWIGINTERN VALUE
1692
1705
  SWIG_ruby_failed(void)
1693
1706
  {
@@ -1819,13 +1832,6 @@ SWIG_From_size_t (size_t value)
1819
1832
 
1820
1833
 
1821
1834
 
1822
- SWIGINTERNINLINE VALUE
1823
- SWIG_FromCharPtr(const char *cptr)
1824
- {
1825
- return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
1826
- }
1827
-
1828
-
1829
1835
  SWIGINTERN int
1830
1836
  SWIG_AsVal_unsigned_SS_short (VALUE obj, unsigned short *val)
1831
1837
  {
@@ -1849,61 +1855,6 @@ SWIG_From_unsigned_SS_short (unsigned short value)
1849
1855
  }
1850
1856
 
1851
1857
 
1852
- SWIGINTERN int
1853
- SWIG_AsVal_char (VALUE obj, char *val)
1854
- {
1855
- int res = SWIG_AsCharArray(obj, val, 1);
1856
- if (!SWIG_IsOK(res)) {
1857
- long v;
1858
- res = SWIG_AddCast(SWIG_AsVal_long (obj, &v));
1859
- if (SWIG_IsOK(res)) {
1860
- if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) {
1861
- if (val) *val = (char)(v);
1862
- } else {
1863
- res = SWIG_OverflowError;
1864
- }
1865
- }
1866
- }
1867
- return res;
1868
- }
1869
-
1870
-
1871
- SWIGINTERNINLINE VALUE
1872
- SWIG_From_char (char c)
1873
- {
1874
- return SWIG_FromCharPtrAndSize(&c,1);
1875
- }
1876
-
1877
-
1878
- /*@SWIG:%ruby_aux_method@*/
1879
- SWIGINTERN VALUE SWIG_AUX_NUM2ULL(VALUE *args)
1880
- {
1881
- VALUE obj = args[0];
1882
- VALUE type = TYPE(obj);
1883
- long long *res = (long long *)(args[1]);
1884
- *res = type == T_FIXNUM ? NUM2ULL(obj) : rb_big2ull(obj);
1885
- return obj;
1886
- }
1887
- /*@SWIG@*/
1888
-
1889
- SWIGINTERN int
1890
- SWIG_AsVal_unsigned_SS_long_SS_long (VALUE obj, unsigned long long *val)
1891
- {
1892
- VALUE type = TYPE(obj);
1893
- if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
1894
- unsigned long long v;
1895
- VALUE a[2];
1896
- a[0] = obj;
1897
- a[1] = (VALUE)(&v);
1898
- if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
1899
- if (val) *val = v;
1900
- return SWIG_OK;
1901
- }
1902
- }
1903
- return SWIG_TypeError;
1904
- }
1905
-
1906
-
1907
1858
  SWIGINTERNINLINE VALUE
1908
1859
  SWIG_From_long_SS_long (long long value)
1909
1860
  {
@@ -1918,35 +1869,49 @@ SWIG_From_unsigned_SS_long_SS_long (unsigned long long value)
1918
1869
  }
1919
1870
 
1920
1871
 
1921
- VALUE memcached_get_ruby_string(memcached_st *ptr, char *key, size_t key_length, uint32_t *flags, memcached_return *error) {
1922
- char *svalue;
1923
- size_t *value_length;
1924
- svalue = memcached_get(ptr, key, key_length, value_length, flags, error);
1925
- return rb_str_new(svalue, *value_length);
1872
+ VALUE memcached_get_rvalue(memcached_st *ptr, char *key, size_t key_length, uint32_t *flags, memcached_return *error) {
1873
+ VALUE ret;
1874
+ size_t value_length;
1875
+ char *value = memcached_get(ptr, key, key_length, &value_length, flags, error);
1876
+ ret = rb_str_new(value, value_length);
1877
+ free(value);
1878
+ return ret;
1926
1879
  };
1927
1880
 
1928
1881
 
1929
- memcached_server_st *memcached_select_server_at(memcached_st *in_ptr, int index) {
1930
- return &(in_ptr->hosts[index]);
1882
+ VALUE memcached_fetch_rvalue(memcached_st *ptr, char *key, size_t *key_length, uint32_t *flags, memcached_return *error) {
1883
+ size_t value_length;
1884
+ VALUE result = rb_ary_new();
1885
+
1886
+ char *value = memcached_fetch(ptr, key, key_length, &value_length, flags, error);
1887
+ if (value == NULL) {
1888
+ rb_ary_push(result, Qnil);
1889
+ } else {
1890
+ VALUE ret = rb_str_new(value, value_length);
1891
+ rb_ary_push(result, ret);
1892
+ free(value);
1893
+ }
1894
+ return result;
1931
1895
  };
1932
1896
 
1933
1897
 
1934
- memcached_stat_st *memcached_select_stat_at(memcached_st *in_ptr, memcached_stat_st *stat_ptr, int index) {
1935
- return &(stat_ptr[index]);
1898
+ VALUE memcached_stat_get_rvalue(memcached_st *ptr, memcached_stat_st *stat, char *key, memcached_return *error) {
1899
+ char *str;
1900
+ VALUE ret;
1901
+ str = memcached_stat_get_value(ptr, stat, key, error);
1902
+ ret = rb_str_new2(str);
1903
+ free(str);
1904
+ return ret;
1936
1905
  };
1937
1906
 
1938
1907
 
1939
- void memcached_repair_server_st(memcached_st *in_ptr, memcached_server_st *host) {
1940
- host->write_ptr= 0;
1908
+ memcached_server_st *memcached_select_server_at(memcached_st *in_ptr, int index) {
1909
+ return &(in_ptr->hosts[index]);
1941
1910
  };
1942
1911
 
1943
1912
 
1944
- memcached_return memcached_mdelete(memcached_st *ptr, char **key, size_t *key_length, unsigned int number_of_keys, time_t expiration) {
1945
- return;
1946
- };
1947
- memcached_return memcached_mdelete_by_key(memcached_st *ptr, char *master_key, size_t master_key_length,
1948
- char **key, size_t *key_length, unsigned int number_of_keys, time_t expiration) {
1949
- return;
1913
+ memcached_stat_st *memcached_select_stat_at(memcached_st *in_ptr, memcached_stat_st *stat_ptr, int index) {
1914
+ return &(stat_ptr[index]);
1950
1915
  };
1951
1916
 
1952
1917
  swig_class cMemcachedServerSt;
@@ -2119,6 +2084,60 @@ fail:
2119
2084
  }
2120
2085
 
2121
2086
 
2087
+ SWIGINTERN VALUE
2088
+ _wrap_MemcachedServerSt_cached_errno_set(int argc, VALUE *argv, VALUE self) {
2089
+ struct memcached_server_st *arg1 = (struct memcached_server_st *) 0 ;
2090
+ int arg2 ;
2091
+ void *argp1 = 0 ;
2092
+ int res1 = 0 ;
2093
+ int val2 ;
2094
+ int ecode2 = 0 ;
2095
+
2096
+ if ((argc < 1) || (argc > 1)) {
2097
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2098
+ }
2099
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_memcached_server_st, 0 | 0 );
2100
+ if (!SWIG_IsOK(res1)) {
2101
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cached_errno" "', argument " "1"" of type '" "struct memcached_server_st *""'");
2102
+ }
2103
+ arg1 = (struct memcached_server_st *)(argp1);
2104
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
2105
+ if (!SWIG_IsOK(ecode2)) {
2106
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cached_errno" "', argument " "2"" of type '" "int""'");
2107
+ }
2108
+ arg2 = (int)(val2);
2109
+ if (arg1) (arg1)->cached_errno = arg2;
2110
+
2111
+ return Qnil;
2112
+ fail:
2113
+ return Qnil;
2114
+ }
2115
+
2116
+
2117
+ SWIGINTERN VALUE
2118
+ _wrap_MemcachedServerSt_cached_errno_get(int argc, VALUE *argv, VALUE self) {
2119
+ struct memcached_server_st *arg1 = (struct memcached_server_st *) 0 ;
2120
+ int result;
2121
+ void *argp1 = 0 ;
2122
+ int res1 = 0 ;
2123
+ VALUE vresult = Qnil;
2124
+
2125
+ if ((argc < 0) || (argc > 0)) {
2126
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2127
+ }
2128
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_memcached_server_st, 0 | 0 );
2129
+ if (!SWIG_IsOK(res1)) {
2130
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cached_errno" "', argument " "1"" of type '" "struct memcached_server_st *""'");
2131
+ }
2132
+ arg1 = (struct memcached_server_st *)(argp1);
2133
+ result = (int) ((arg1)->cached_errno);
2134
+ vresult = SWIG_From_int((int)(result));
2135
+ return vresult;
2136
+ fail:
2137
+ return Qnil;
2138
+ }
2139
+
2140
+
2122
2141
  SWIGINTERN VALUE
2123
2142
  _wrap_MemcachedServerSt_cursor_active_set(int argc, VALUE *argv, VALUE self) {
2124
2143
  struct memcached_server_st *arg1 = (struct memcached_server_st *) 0 ;
@@ -2287,68 +2306,6 @@ fail:
2287
2306
  }
2288
2307
 
2289
2308
 
2290
- SWIGINTERN VALUE
2291
- _wrap_MemcachedServerSt_write_ptr_set(int argc, VALUE *argv, VALUE self) {
2292
- struct memcached_server_st *arg1 = (struct memcached_server_st *) 0 ;
2293
- char *arg2 = (char *) 0 ;
2294
- void *argp1 = 0 ;
2295
- int res1 = 0 ;
2296
- int res2 ;
2297
- char *buf2 = 0 ;
2298
- int alloc2 = 0 ;
2299
-
2300
- if ((argc < 1) || (argc > 1)) {
2301
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2302
- }
2303
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_memcached_server_st, 0 | 0 );
2304
- if (!SWIG_IsOK(res1)) {
2305
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_ptr" "', argument " "1"" of type '" "struct memcached_server_st *""'");
2306
- }
2307
- arg1 = (struct memcached_server_st *)(argp1);
2308
- res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
2309
- if (!SWIG_IsOK(res2)) {
2310
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_ptr" "', argument " "2"" of type '" "char *""'");
2311
- }
2312
- arg2 = buf2;
2313
- if (arg1->write_ptr) free((char*)arg1->write_ptr);
2314
- if (arg2) {
2315
- size_t size = strlen(arg2) + 1;
2316
- arg1->write_ptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size));
2317
- } else {
2318
- arg1->write_ptr = 0;
2319
- }
2320
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2321
- return Qnil;
2322
- fail:
2323
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2324
- return Qnil;
2325
- }
2326
-
2327
-
2328
- SWIGINTERN VALUE
2329
- _wrap_MemcachedServerSt_write_ptr_get(int argc, VALUE *argv, VALUE self) {
2330
- struct memcached_server_st *arg1 = (struct memcached_server_st *) 0 ;
2331
- char *result = 0 ;
2332
- void *argp1 = 0 ;
2333
- int res1 = 0 ;
2334
- VALUE vresult = Qnil;
2335
-
2336
- if ((argc < 0) || (argc > 0)) {
2337
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2338
- }
2339
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_memcached_server_st, 0 | 0 );
2340
- if (!SWIG_IsOK(res1)) {
2341
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_ptr" "', argument " "1"" of type '" "struct memcached_server_st *""'");
2342
- }
2343
- arg1 = (struct memcached_server_st *)(argp1);
2344
- result = (char *) ((arg1)->write_ptr);
2345
- vresult = SWIG_FromCharPtr(result);
2346
- return vresult;
2347
- fail:
2348
- return Qnil;
2349
- }
2350
-
2351
-
2352
2309
  SWIGINTERN VALUE
2353
2310
  _wrap_MemcachedServerSt_read_buffer_set(int argc, VALUE *argv, VALUE self) {
2354
2311
  struct memcached_server_st *arg1 = (struct memcached_server_st *) 0 ;
@@ -2957,6 +2914,60 @@ fail:
2957
2914
  }
2958
2915
 
2959
2916
 
2917
+ SWIGINTERN VALUE
2918
+ _wrap_MemcachedServerSt_root_set(int argc, VALUE *argv, VALUE self) {
2919
+ struct memcached_server_st *arg1 = (struct memcached_server_st *) 0 ;
2920
+ memcached_st *arg2 = (memcached_st *) 0 ;
2921
+ void *argp1 = 0 ;
2922
+ int res1 = 0 ;
2923
+ void *argp2 = 0 ;
2924
+ int res2 = 0 ;
2925
+
2926
+ if ((argc < 1) || (argc > 1)) {
2927
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2928
+ }
2929
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_memcached_server_st, 0 | 0 );
2930
+ if (!SWIG_IsOK(res1)) {
2931
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "root" "', argument " "1"" of type '" "struct memcached_server_st *""'");
2932
+ }
2933
+ arg1 = (struct memcached_server_st *)(argp1);
2934
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_memcached_st, SWIG_POINTER_DISOWN | 0 );
2935
+ if (!SWIG_IsOK(res2)) {
2936
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "root" "', argument " "2"" of type '" "memcached_st *""'");
2937
+ }
2938
+ arg2 = (memcached_st *)(argp2);
2939
+ if (arg1) (arg1)->root = arg2;
2940
+
2941
+ return Qnil;
2942
+ fail:
2943
+ return Qnil;
2944
+ }
2945
+
2946
+
2947
+ SWIGINTERN VALUE
2948
+ _wrap_MemcachedServerSt_root_get(int argc, VALUE *argv, VALUE self) {
2949
+ struct memcached_server_st *arg1 = (struct memcached_server_st *) 0 ;
2950
+ memcached_st *result = 0 ;
2951
+ void *argp1 = 0 ;
2952
+ int res1 = 0 ;
2953
+ VALUE vresult = Qnil;
2954
+
2955
+ if ((argc < 0) || (argc > 0)) {
2956
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2957
+ }
2958
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_memcached_server_st, 0 | 0 );
2959
+ if (!SWIG_IsOK(res1)) {
2960
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "root" "', argument " "1"" of type '" "struct memcached_server_st *""'");
2961
+ }
2962
+ arg1 = (struct memcached_server_st *)(argp1);
2963
+ result = (memcached_st *) ((arg1)->root);
2964
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_memcached_st, 0 | 0 );
2965
+ return vresult;
2966
+ fail:
2967
+ return Qnil;
2968
+ }
2969
+
2970
+
2960
2971
  #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2961
2972
  SWIGINTERN VALUE
2962
2973
  _wrap_MemcachedServerSt_allocate(VALUE self) {
@@ -5500,61 +5511,7 @@ fail:
5500
5511
 
5501
5512
 
5502
5513
  SWIGINTERN VALUE
5503
- _wrap_MemcachedSt_connected_set(int argc, VALUE *argv, VALUE self) {
5504
- struct memcached_st *arg1 = (struct memcached_st *) 0 ;
5505
- char arg2 ;
5506
- void *argp1 = 0 ;
5507
- int res1 = 0 ;
5508
- char val2 ;
5509
- int ecode2 = 0 ;
5510
-
5511
- if ((argc < 1) || (argc > 1)) {
5512
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5513
- }
5514
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
5515
- if (!SWIG_IsOK(res1)) {
5516
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connected" "', argument " "1"" of type '" "struct memcached_st *""'");
5517
- }
5518
- arg1 = (struct memcached_st *)(argp1);
5519
- ecode2 = SWIG_AsVal_char(argv[0], &val2);
5520
- if (!SWIG_IsOK(ecode2)) {
5521
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "connected" "', argument " "2"" of type '" "char""'");
5522
- }
5523
- arg2 = (char)(val2);
5524
- if (arg1) (arg1)->connected = arg2;
5525
-
5526
- return Qnil;
5527
- fail:
5528
- return Qnil;
5529
- }
5530
-
5531
-
5532
- SWIGINTERN VALUE
5533
- _wrap_MemcachedSt_connected_get(int argc, VALUE *argv, VALUE self) {
5534
- struct memcached_st *arg1 = (struct memcached_st *) 0 ;
5535
- char result;
5536
- void *argp1 = 0 ;
5537
- int res1 = 0 ;
5538
- VALUE vresult = Qnil;
5539
-
5540
- if ((argc < 0) || (argc > 0)) {
5541
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5542
- }
5543
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
5544
- if (!SWIG_IsOK(res1)) {
5545
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connected" "', argument " "1"" of type '" "struct memcached_st *""'");
5546
- }
5547
- arg1 = (struct memcached_st *)(argp1);
5548
- result = (char) ((arg1)->connected);
5549
- vresult = SWIG_From_char((char)(result));
5550
- return vresult;
5551
- fail:
5552
- return Qnil;
5553
- }
5554
-
5555
-
5556
- SWIGINTERN VALUE
5557
- _wrap_MemcachedSt_cached_errno_set(int argc, VALUE *argv, VALUE self) {
5514
+ _wrap_MemcachedSt_cached_errno_set(int argc, VALUE *argv, VALUE self) {
5558
5515
  struct memcached_st *arg1 = (struct memcached_st *) 0 ;
5559
5516
  int arg2 ;
5560
5517
  void *argp1 = 0 ;
@@ -5610,10 +5567,10 @@ fail:
5610
5567
  SWIGINTERN VALUE
5611
5568
  _wrap_MemcachedSt_flags_set(int argc, VALUE *argv, VALUE self) {
5612
5569
  struct memcached_st *arg1 = (struct memcached_st *) 0 ;
5613
- unsigned long long arg2 ;
5570
+ uint32_t arg2 ;
5614
5571
  void *argp1 = 0 ;
5615
5572
  int res1 = 0 ;
5616
- unsigned long long val2 ;
5573
+ unsigned long val2 ;
5617
5574
  int ecode2 = 0 ;
5618
5575
 
5619
5576
  if ((argc < 1) || (argc > 1)) {
@@ -5624,11 +5581,11 @@ _wrap_MemcachedSt_flags_set(int argc, VALUE *argv, VALUE self) {
5624
5581
  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flags" "', argument " "1"" of type '" "struct memcached_st *""'");
5625
5582
  }
5626
5583
  arg1 = (struct memcached_st *)(argp1);
5627
- ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[0], &val2);
5584
+ ecode2 = SWIG_AsVal_unsigned_SS_long(argv[0], &val2);
5628
5585
  if (!SWIG_IsOK(ecode2)) {
5629
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "flags" "', argument " "2"" of type '" "unsigned long long""'");
5586
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "flags" "', argument " "2"" of type '" "uint32_t""'");
5630
5587
  }
5631
- arg2 = (unsigned long long)(val2);
5588
+ arg2 = (uint32_t)(val2);
5632
5589
  if (arg1) (arg1)->flags = arg2;
5633
5590
 
5634
5591
  return Qnil;
@@ -5640,7 +5597,7 @@ fail:
5640
5597
  SWIGINTERN VALUE
5641
5598
  _wrap_MemcachedSt_flags_get(int argc, VALUE *argv, VALUE self) {
5642
5599
  struct memcached_st *arg1 = (struct memcached_st *) 0 ;
5643
- unsigned long long result;
5600
+ uint32_t result;
5644
5601
  void *argp1 = 0 ;
5645
5602
  int res1 = 0 ;
5646
5603
  VALUE vresult = Qnil;
@@ -5653,8 +5610,8 @@ _wrap_MemcachedSt_flags_get(int argc, VALUE *argv, VALUE self) {
5653
5610
  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flags" "', argument " "1"" of type '" "struct memcached_st *""'");
5654
5611
  }
5655
5612
  arg1 = (struct memcached_st *)(argp1);
5656
- result = (unsigned long long) ((arg1)->flags);
5657
- vresult = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result));
5613
+ result = ((arg1)->flags);
5614
+ vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
5658
5615
  return vresult;
5659
5616
  fail:
5660
5617
  return Qnil;
@@ -6103,6 +6060,271 @@ fail:
6103
6060
  }
6104
6061
 
6105
6062
 
6063
+ SWIGINTERN VALUE
6064
+ _wrap_MemcachedSt_on_clone_set(int argc, VALUE *argv, VALUE self) {
6065
+ struct memcached_st *arg1 = (struct memcached_st *) 0 ;
6066
+ memcached_clone_func arg2 = (memcached_clone_func) 0 ;
6067
+ void *argp1 = 0 ;
6068
+ int res1 = 0 ;
6069
+
6070
+ if ((argc < 1) || (argc > 1)) {
6071
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6072
+ }
6073
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
6074
+ if (!SWIG_IsOK(res1)) {
6075
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "on_clone" "', argument " "1"" of type '" "struct memcached_st *""'");
6076
+ }
6077
+ arg1 = (struct memcached_st *)(argp1);
6078
+ {
6079
+ int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg2), SWIGTYPE_p_f_p_struct_memcached_st_p_struct_memcached_st__memcached_return);
6080
+ if (!SWIG_IsOK(res)) {
6081
+ SWIG_exception_fail(SWIG_ArgError(res), "in method '" "on_clone" "', argument " "2"" of type '" "memcached_clone_func""'");
6082
+ }
6083
+ }
6084
+ if (arg1) (arg1)->on_clone = arg2;
6085
+
6086
+ return Qnil;
6087
+ fail:
6088
+ return Qnil;
6089
+ }
6090
+
6091
+
6092
+ SWIGINTERN VALUE
6093
+ _wrap_MemcachedSt_on_clone_get(int argc, VALUE *argv, VALUE self) {
6094
+ struct memcached_st *arg1 = (struct memcached_st *) 0 ;
6095
+ memcached_clone_func result;
6096
+ void *argp1 = 0 ;
6097
+ int res1 = 0 ;
6098
+ VALUE vresult = Qnil;
6099
+
6100
+ if ((argc < 0) || (argc > 0)) {
6101
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6102
+ }
6103
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
6104
+ if (!SWIG_IsOK(res1)) {
6105
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "on_clone" "', argument " "1"" of type '" "struct memcached_st *""'");
6106
+ }
6107
+ arg1 = (struct memcached_st *)(argp1);
6108
+ result = (memcached_clone_func) ((arg1)->on_clone);
6109
+ vresult = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_struct_memcached_st_p_struct_memcached_st__memcached_return);
6110
+ return vresult;
6111
+ fail:
6112
+ return Qnil;
6113
+ }
6114
+
6115
+
6116
+ SWIGINTERN VALUE
6117
+ _wrap_MemcachedSt_on_cleanup_set(int argc, VALUE *argv, VALUE self) {
6118
+ struct memcached_st *arg1 = (struct memcached_st *) 0 ;
6119
+ memcached_cleanup_func arg2 = (memcached_cleanup_func) 0 ;
6120
+ void *argp1 = 0 ;
6121
+ int res1 = 0 ;
6122
+
6123
+ if ((argc < 1) || (argc > 1)) {
6124
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6125
+ }
6126
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
6127
+ if (!SWIG_IsOK(res1)) {
6128
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "on_cleanup" "', argument " "1"" of type '" "struct memcached_st *""'");
6129
+ }
6130
+ arg1 = (struct memcached_st *)(argp1);
6131
+ {
6132
+ int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg2), SWIGTYPE_p_f_p_struct_memcached_st__memcached_return);
6133
+ if (!SWIG_IsOK(res)) {
6134
+ SWIG_exception_fail(SWIG_ArgError(res), "in method '" "on_cleanup" "', argument " "2"" of type '" "memcached_cleanup_func""'");
6135
+ }
6136
+ }
6137
+ if (arg1) (arg1)->on_cleanup = arg2;
6138
+
6139
+ return Qnil;
6140
+ fail:
6141
+ return Qnil;
6142
+ }
6143
+
6144
+
6145
+ SWIGINTERN VALUE
6146
+ _wrap_MemcachedSt_on_cleanup_get(int argc, VALUE *argv, VALUE self) {
6147
+ struct memcached_st *arg1 = (struct memcached_st *) 0 ;
6148
+ memcached_cleanup_func result;
6149
+ void *argp1 = 0 ;
6150
+ int res1 = 0 ;
6151
+ VALUE vresult = Qnil;
6152
+
6153
+ if ((argc < 0) || (argc > 0)) {
6154
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6155
+ }
6156
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
6157
+ if (!SWIG_IsOK(res1)) {
6158
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "on_cleanup" "', argument " "1"" of type '" "struct memcached_st *""'");
6159
+ }
6160
+ arg1 = (struct memcached_st *)(argp1);
6161
+ result = (memcached_cleanup_func) ((arg1)->on_cleanup);
6162
+ vresult = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_struct_memcached_st__memcached_return);
6163
+ return vresult;
6164
+ fail:
6165
+ return Qnil;
6166
+ }
6167
+
6168
+
6169
+ SWIGINTERN VALUE
6170
+ _wrap_MemcachedSt_call_free_set(int argc, VALUE *argv, VALUE self) {
6171
+ struct memcached_st *arg1 = (struct memcached_st *) 0 ;
6172
+ memcached_free_function arg2 = (memcached_free_function) 0 ;
6173
+ void *argp1 = 0 ;
6174
+ int res1 = 0 ;
6175
+
6176
+ if ((argc < 1) || (argc > 1)) {
6177
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6178
+ }
6179
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
6180
+ if (!SWIG_IsOK(res1)) {
6181
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "call_free" "', argument " "1"" of type '" "struct memcached_st *""'");
6182
+ }
6183
+ arg1 = (struct memcached_st *)(argp1);
6184
+ {
6185
+ int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg2), SWIGTYPE_p_f_p_struct_memcached_st_p_void__void);
6186
+ if (!SWIG_IsOK(res)) {
6187
+ SWIG_exception_fail(SWIG_ArgError(res), "in method '" "call_free" "', argument " "2"" of type '" "memcached_free_function""'");
6188
+ }
6189
+ }
6190
+ if (arg1) (arg1)->call_free = arg2;
6191
+
6192
+ return Qnil;
6193
+ fail:
6194
+ return Qnil;
6195
+ }
6196
+
6197
+
6198
+ SWIGINTERN VALUE
6199
+ _wrap_MemcachedSt_call_free_get(int argc, VALUE *argv, VALUE self) {
6200
+ struct memcached_st *arg1 = (struct memcached_st *) 0 ;
6201
+ memcached_free_function result;
6202
+ void *argp1 = 0 ;
6203
+ int res1 = 0 ;
6204
+ VALUE vresult = Qnil;
6205
+
6206
+ if ((argc < 0) || (argc > 0)) {
6207
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6208
+ }
6209
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
6210
+ if (!SWIG_IsOK(res1)) {
6211
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "call_free" "', argument " "1"" of type '" "struct memcached_st *""'");
6212
+ }
6213
+ arg1 = (struct memcached_st *)(argp1);
6214
+ result = (memcached_free_function) ((arg1)->call_free);
6215
+ vresult = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_struct_memcached_st_p_void__void);
6216
+ return vresult;
6217
+ fail:
6218
+ return Qnil;
6219
+ }
6220
+
6221
+
6222
+ SWIGINTERN VALUE
6223
+ _wrap_MemcachedSt_call_malloc_set(int argc, VALUE *argv, VALUE self) {
6224
+ struct memcached_st *arg1 = (struct memcached_st *) 0 ;
6225
+ memcached_malloc_function arg2 = (memcached_malloc_function) 0 ;
6226
+ void *argp1 = 0 ;
6227
+ int res1 = 0 ;
6228
+
6229
+ if ((argc < 1) || (argc > 1)) {
6230
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6231
+ }
6232
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
6233
+ if (!SWIG_IsOK(res1)) {
6234
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "call_malloc" "', argument " "1"" of type '" "struct memcached_st *""'");
6235
+ }
6236
+ arg1 = (struct memcached_st *)(argp1);
6237
+ {
6238
+ int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg2), SWIGTYPE_p_f_p_struct_memcached_st_q_const__size_t__p_void);
6239
+ if (!SWIG_IsOK(res)) {
6240
+ SWIG_exception_fail(SWIG_ArgError(res), "in method '" "call_malloc" "', argument " "2"" of type '" "memcached_malloc_function""'");
6241
+ }
6242
+ }
6243
+ if (arg1) (arg1)->call_malloc = arg2;
6244
+
6245
+ return Qnil;
6246
+ fail:
6247
+ return Qnil;
6248
+ }
6249
+
6250
+
6251
+ SWIGINTERN VALUE
6252
+ _wrap_MemcachedSt_call_malloc_get(int argc, VALUE *argv, VALUE self) {
6253
+ struct memcached_st *arg1 = (struct memcached_st *) 0 ;
6254
+ memcached_malloc_function result;
6255
+ void *argp1 = 0 ;
6256
+ int res1 = 0 ;
6257
+ VALUE vresult = Qnil;
6258
+
6259
+ if ((argc < 0) || (argc > 0)) {
6260
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6261
+ }
6262
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
6263
+ if (!SWIG_IsOK(res1)) {
6264
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "call_malloc" "', argument " "1"" of type '" "struct memcached_st *""'");
6265
+ }
6266
+ arg1 = (struct memcached_st *)(argp1);
6267
+ result = (memcached_malloc_function) ((arg1)->call_malloc);
6268
+ vresult = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_struct_memcached_st_q_const__size_t__p_void);
6269
+ return vresult;
6270
+ fail:
6271
+ return Qnil;
6272
+ }
6273
+
6274
+
6275
+ SWIGINTERN VALUE
6276
+ _wrap_MemcachedSt_call_realloc_set(int argc, VALUE *argv, VALUE self) {
6277
+ struct memcached_st *arg1 = (struct memcached_st *) 0 ;
6278
+ memcached_realloc_function arg2 = (memcached_realloc_function) 0 ;
6279
+ void *argp1 = 0 ;
6280
+ int res1 = 0 ;
6281
+
6282
+ if ((argc < 1) || (argc > 1)) {
6283
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6284
+ }
6285
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
6286
+ if (!SWIG_IsOK(res1)) {
6287
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "call_realloc" "', argument " "1"" of type '" "struct memcached_st *""'");
6288
+ }
6289
+ arg1 = (struct memcached_st *)(argp1);
6290
+ {
6291
+ int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg2), SWIGTYPE_p_f_p_struct_memcached_st_p_void_q_const__size_t__p_void);
6292
+ if (!SWIG_IsOK(res)) {
6293
+ SWIG_exception_fail(SWIG_ArgError(res), "in method '" "call_realloc" "', argument " "2"" of type '" "memcached_realloc_function""'");
6294
+ }
6295
+ }
6296
+ if (arg1) (arg1)->call_realloc = arg2;
6297
+
6298
+ return Qnil;
6299
+ fail:
6300
+ return Qnil;
6301
+ }
6302
+
6303
+
6304
+ SWIGINTERN VALUE
6305
+ _wrap_MemcachedSt_call_realloc_get(int argc, VALUE *argv, VALUE self) {
6306
+ struct memcached_st *arg1 = (struct memcached_st *) 0 ;
6307
+ memcached_realloc_function result;
6308
+ void *argp1 = 0 ;
6309
+ int res1 = 0 ;
6310
+ VALUE vresult = Qnil;
6311
+
6312
+ if ((argc < 0) || (argc > 0)) {
6313
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6314
+ }
6315
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
6316
+ if (!SWIG_IsOK(res1)) {
6317
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "call_realloc" "', argument " "1"" of type '" "struct memcached_st *""'");
6318
+ }
6319
+ arg1 = (struct memcached_st *)(argp1);
6320
+ result = (memcached_realloc_function) ((arg1)->call_realloc);
6321
+ vresult = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_struct_memcached_st_p_void_q_const__size_t__p_void);
6322
+ return vresult;
6323
+ fail:
6324
+ return Qnil;
6325
+ }
6326
+
6327
+
6106
6328
  #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
6107
6329
  SWIGINTERN VALUE
6108
6330
  _wrap_MemcachedSt_allocate(VALUE self) {
@@ -6140,6 +6362,22 @@ free_memcached_st(struct memcached_st *arg1) {
6140
6362
  free((char *) arg1);
6141
6363
  }
6142
6364
 
6365
+ SWIGINTERN VALUE
6366
+ _wrap_memcached_lib_version(int argc, VALUE *argv, VALUE self) {
6367
+ char *result = 0 ;
6368
+ VALUE vresult = Qnil;
6369
+
6370
+ if ((argc < 0) || (argc > 0)) {
6371
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
6372
+ }
6373
+ result = (char *)memcached_lib_version();
6374
+ vresult = SWIG_FromCharPtr(result);
6375
+ return vresult;
6376
+ fail:
6377
+ return Qnil;
6378
+ }
6379
+
6380
+
6143
6381
  SWIGINTERN VALUE
6144
6382
  _wrap_memcached_create(int argc, VALUE *argv, VALUE self) {
6145
6383
  memcached_st *arg1 = (memcached_st *) 0 ;
@@ -7058,41 +7296,39 @@ _wrap_memcached_mget(int argc, VALUE *argv, VALUE self) {
7058
7296
  memcached_return result;
7059
7297
  void *argp1 = 0 ;
7060
7298
  int res1 = 0 ;
7061
- void *argp2 = 0 ;
7062
- int res2 = 0 ;
7063
- void *argp3 = 0 ;
7064
- int res3 = 0 ;
7065
- unsigned int val4 ;
7066
- int ecode4 = 0 ;
7067
7299
  VALUE vresult = Qnil;
7068
7300
 
7069
- if ((argc < 4) || (argc > 4)) {
7070
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
7301
+ if ((argc < 2) || (argc > 2)) {
7302
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
7071
7303
  }
7072
7304
  res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
7073
7305
  if (!SWIG_IsOK(res1)) {
7074
7306
  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "memcached_mget" "', argument " "1"" of type '" "memcached_st *""'");
7075
7307
  }
7076
7308
  arg1 = (memcached_st *)(argp1);
7077
- res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_p_char, 0 | 0 );
7078
- if (!SWIG_IsOK(res2)) {
7079
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "memcached_mget" "', argument " "2"" of type '" "char **""'");
7080
- }
7081
- arg2 = (char **)(argp2);
7082
- res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_size_t, 0 | 0 );
7083
- if (!SWIG_IsOK(res3)) {
7084
- SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "memcached_mget" "', argument " "3"" of type '" "size_t *""'");
7309
+ {
7310
+ int i;
7311
+ Check_Type(argv[1], T_ARRAY);
7312
+ arg4 = (unsigned int) RARRAY_LEN(argv[1]);
7313
+ arg3 = (size_t *) malloc((arg4+1)*sizeof(size_t));
7314
+ arg2 = (char **) malloc((arg4+1)*sizeof(char *));
7315
+ for(i = 0; i < arg4; i ++) {
7316
+ arg3[i] = strlen(StringValuePtr(RARRAY_PTR(argv[1])[i]));
7317
+ arg2[i] = StringValuePtr(RARRAY_PTR(argv[1])[i]);
7318
+ }
7085
7319
  }
7086
- arg3 = (size_t *)(argp3);
7087
- ecode4 = SWIG_AsVal_unsigned_SS_int(argv[3], &val4);
7088
- if (!SWIG_IsOK(ecode4)) {
7089
- SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "memcached_mget" "', argument " "4"" of type '" "unsigned int""'");
7090
- }
7091
- arg4 = (unsigned int)(val4);
7092
7320
  result = (memcached_return)memcached_mget(arg1,arg2,arg3,arg4);
7093
7321
  vresult = SWIG_From_int((int)(result));
7322
+ {
7323
+ free(arg2);
7324
+ free(arg3);
7325
+ }
7094
7326
  return vresult;
7095
7327
  fail:
7328
+ {
7329
+ free(arg2);
7330
+ free(arg3);
7331
+ }
7096
7332
  return Qnil;
7097
7333
  }
7098
7334
 
@@ -7108,11 +7344,6 @@ _wrap_memcached_fetch(int argc, VALUE *argv, VALUE self) {
7108
7344
  char *result = 0 ;
7109
7345
  void *argp1 = 0 ;
7110
7346
  int res1 = 0 ;
7111
- int res2 ;
7112
- char *buf2 = 0 ;
7113
- int alloc2 = 0 ;
7114
- void *argp3 = 0 ;
7115
- int res3 = 0 ;
7116
7347
  size_t temp4 ;
7117
7348
  int res4 = SWIG_TMPOBJ ;
7118
7349
  uint32_t temp5 ;
@@ -7121,29 +7352,30 @@ _wrap_memcached_fetch(int argc, VALUE *argv, VALUE self) {
7121
7352
  int res6 = SWIG_TMPOBJ ;
7122
7353
  VALUE vresult = Qnil;
7123
7354
 
7355
+ {
7356
+ arg2 = malloc(512*sizeof(char));
7357
+ arg3 = malloc(sizeof(size_t)); // XXX Could possibly be the address of a local
7358
+ }
7124
7359
  arg4 = &temp4;
7125
7360
  arg5 = &temp5;
7126
7361
  arg6 = &temp6;
7127
- if ((argc < 3) || (argc > 3)) {
7128
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
7362
+ if ((argc < 1) || (argc > 1)) {
7363
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7129
7364
  }
7130
7365
  res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
7131
7366
  if (!SWIG_IsOK(res1)) {
7132
7367
  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "memcached_fetch" "', argument " "1"" of type '" "memcached_st *""'");
7133
7368
  }
7134
7369
  arg1 = (memcached_st *)(argp1);
7135
- res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
7136
- if (!SWIG_IsOK(res2)) {
7137
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "memcached_fetch" "', argument " "2"" of type '" "char *""'");
7138
- }
7139
- arg2 = buf2;
7140
- res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_size_t, 0 | 0 );
7141
- if (!SWIG_IsOK(res3)) {
7142
- SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "memcached_fetch" "', argument " "3"" of type '" "size_t *""'");
7143
- }
7144
- arg3 = (size_t *)(argp3);
7145
7370
  result = (char *)memcached_fetch(arg1,arg2,arg3,arg4,arg5,arg6);
7146
7371
  vresult = SWIG_FromCharPtr(result);
7372
+ {
7373
+ if (arg2 != NULL) {
7374
+ rb_ary_push(vresult, rb_str_new(arg2, *arg3));
7375
+ free(arg2);
7376
+ free(arg3);
7377
+ }
7378
+ }
7147
7379
  if (SWIG_IsTmpObj(res4)) {
7148
7380
  vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_size_t((*arg4)));
7149
7381
  } else {
@@ -7162,10 +7394,8 @@ _wrap_memcached_fetch(int argc, VALUE *argv, VALUE self) {
7162
7394
  int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
7163
7395
  vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_memcached_return, new_flags));
7164
7396
  }
7165
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7166
7397
  return vresult;
7167
7398
  fail:
7168
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7169
7399
  return Qnil;
7170
7400
  }
7171
7401
 
@@ -7690,16 +7920,10 @@ _wrap_memcached_mget_by_key(int argc, VALUE *argv, VALUE self) {
7690
7920
  int alloc2 = 0 ;
7691
7921
  size_t val3 ;
7692
7922
  int ecode3 = 0 ;
7693
- void *argp4 = 0 ;
7694
- int res4 = 0 ;
7695
- void *argp5 = 0 ;
7696
- int res5 = 0 ;
7697
- unsigned int val6 ;
7698
- int ecode6 = 0 ;
7699
7923
  VALUE vresult = Qnil;
7700
7924
 
7701
- if ((argc < 6) || (argc > 6)) {
7702
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
7925
+ if ((argc < 4) || (argc > 4)) {
7926
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
7703
7927
  }
7704
7928
  res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
7705
7929
  if (!SWIG_IsOK(res1)) {
@@ -7716,27 +7940,31 @@ _wrap_memcached_mget_by_key(int argc, VALUE *argv, VALUE self) {
7716
7940
  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "memcached_mget_by_key" "', argument " "3"" of type '" "size_t""'");
7717
7941
  }
7718
7942
  arg3 = (size_t)(val3);
7719
- res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_p_char, 0 | 0 );
7720
- if (!SWIG_IsOK(res4)) {
7721
- SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "memcached_mget_by_key" "', argument " "4"" of type '" "char **""'");
7722
- }
7723
- arg4 = (char **)(argp4);
7724
- res5 = SWIG_ConvertPtr(argv[4], &argp5,SWIGTYPE_p_size_t, 0 | 0 );
7725
- if (!SWIG_IsOK(res5)) {
7726
- SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "memcached_mget_by_key" "', argument " "5"" of type '" "size_t *""'");
7727
- }
7728
- arg5 = (size_t *)(argp5);
7729
- ecode6 = SWIG_AsVal_unsigned_SS_int(argv[5], &val6);
7730
- if (!SWIG_IsOK(ecode6)) {
7731
- SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "memcached_mget_by_key" "', argument " "6"" of type '" "unsigned int""'");
7732
- }
7733
- arg6 = (unsigned int)(val6);
7943
+ {
7944
+ int i;
7945
+ Check_Type(argv[3], T_ARRAY);
7946
+ arg6 = (unsigned int) RARRAY_LEN(argv[3]);
7947
+ arg5 = (size_t *) malloc((arg6+1)*sizeof(size_t));
7948
+ arg4 = (char **) malloc((arg6+1)*sizeof(char *));
7949
+ for(i = 0; i < arg6; i ++) {
7950
+ arg5[i] = strlen(StringValuePtr(RARRAY_PTR(argv[3])[i]));
7951
+ arg4[i] = StringValuePtr(RARRAY_PTR(argv[3])[i]);
7952
+ }
7953
+ }
7734
7954
  result = (memcached_return)memcached_mget_by_key(arg1,arg2,arg3,arg4,arg5,arg6);
7735
7955
  vresult = SWIG_From_int((int)(result));
7736
7956
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7957
+ {
7958
+ free(arg4);
7959
+ free(arg5);
7960
+ }
7737
7961
  return vresult;
7738
7962
  fail:
7739
7963
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7964
+ {
7965
+ free(arg4);
7966
+ free(arg5);
7967
+ }
7740
7968
  return Qnil;
7741
7969
  }
7742
7970
 
@@ -8232,53 +8460,44 @@ fail:
8232
8460
 
8233
8461
 
8234
8462
  SWIGINTERN VALUE
8235
- _wrap_memcached_mdelete(int argc, VALUE *argv, VALUE self) {
8463
+ _wrap_memcached_fetch_execute(int argc, VALUE *argv, VALUE self) {
8236
8464
  memcached_st *arg1 = (memcached_st *) 0 ;
8237
- char **arg2 = (char **) 0 ;
8238
- size_t *arg3 = (size_t *) 0 ;
8465
+ unsigned int (**arg2)(memcached_st *,memcached_result_st *,void *) ;
8466
+ void *arg3 = (void *) 0 ;
8239
8467
  unsigned int arg4 ;
8240
- time_t arg5 ;
8241
8468
  memcached_return result;
8242
8469
  void *argp1 = 0 ;
8243
8470
  int res1 = 0 ;
8244
8471
  void *argp2 = 0 ;
8245
8472
  int res2 = 0 ;
8246
- void *argp3 = 0 ;
8247
- int res3 = 0 ;
8473
+ int res3 ;
8248
8474
  unsigned int val4 ;
8249
8475
  int ecode4 = 0 ;
8250
8476
  VALUE vresult = Qnil;
8251
8477
 
8252
- if ((argc < 5) || (argc > 5)) {
8253
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
8478
+ if ((argc < 4) || (argc > 4)) {
8479
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
8254
8480
  }
8255
8481
  res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
8256
8482
  if (!SWIG_IsOK(res1)) {
8257
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "memcached_mdelete" "', argument " "1"" of type '" "memcached_st *""'");
8483
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "memcached_fetch_execute" "', argument " "1"" of type '" "memcached_st *""'");
8258
8484
  }
8259
8485
  arg1 = (memcached_st *)(argp1);
8260
- res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_p_char, 0 | 0 );
8486
+ res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_p_f_p_struct_memcached_st_p_struct_memcached_result_st_p_void__unsigned_int, 0 | 0 );
8261
8487
  if (!SWIG_IsOK(res2)) {
8262
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "memcached_mdelete" "', argument " "2"" of type '" "char **""'");
8263
- }
8264
- arg2 = (char **)(argp2);
8265
- res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_size_t, 0 | 0 );
8488
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "memcached_fetch_execute" "', argument " "2"" of type '" "unsigned int (*[])(memcached_st *,memcached_result_st *,void *)""'");
8489
+ }
8490
+ arg2 = (unsigned int (**)(memcached_st *,memcached_result_st *,void *))(argp2);
8491
+ res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0);
8266
8492
  if (!SWIG_IsOK(res3)) {
8267
- SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "memcached_mdelete" "', argument " "3"" of type '" "size_t *""'");
8493
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "memcached_fetch_execute" "', argument " "3"" of type '" "void *""'");
8268
8494
  }
8269
- arg3 = (size_t *)(argp3);
8270
8495
  ecode4 = SWIG_AsVal_unsigned_SS_int(argv[3], &val4);
8271
8496
  if (!SWIG_IsOK(ecode4)) {
8272
- SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "memcached_mdelete" "', argument " "4"" of type '" "unsigned int""'");
8497
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "memcached_fetch_execute" "', argument " "4"" of type '" "unsigned int""'");
8273
8498
  }
8274
8499
  arg4 = (unsigned int)(val4);
8275
- {
8276
- if (NIL_P(argv[4]))
8277
- arg5 = (time_t)-1;
8278
- else
8279
- arg5 = NUM2LONG(rb_funcall(argv[4], rb_intern("tv_sec"), 0));
8280
- }
8281
- result = (memcached_return)memcached_mdelete(arg1,arg2,arg3,arg4,arg5);
8500
+ result = (memcached_return)memcached_fetch_execute(arg1,arg2,arg3,arg4);
8282
8501
  vresult = SWIG_From_int((int)(result));
8283
8502
  return vresult;
8284
8503
  fail:
@@ -8287,119 +8506,84 @@ fail:
8287
8506
 
8288
8507
 
8289
8508
  SWIGINTERN VALUE
8290
- _wrap_memcached_mdelete_by_key(int argc, VALUE *argv, VALUE self) {
8509
+ _wrap_memcached_callback_set(int argc, VALUE *argv, VALUE self) {
8291
8510
  memcached_st *arg1 = (memcached_st *) 0 ;
8292
- char *arg2 = (char *) 0 ;
8293
- size_t arg3 ;
8294
- char **arg4 = (char **) 0 ;
8295
- size_t *arg5 = (size_t *) 0 ;
8296
- unsigned int arg6 ;
8297
- time_t arg7 ;
8511
+ memcached_callback arg2 ;
8512
+ void *arg3 = (void *) 0 ;
8298
8513
  memcached_return result;
8299
8514
  void *argp1 = 0 ;
8300
8515
  int res1 = 0 ;
8301
- int res2 ;
8302
- char *buf2 = 0 ;
8303
- int alloc2 = 0 ;
8304
- size_t val3 ;
8305
- int ecode3 = 0 ;
8306
- void *argp4 = 0 ;
8307
- int res4 = 0 ;
8308
- void *argp5 = 0 ;
8309
- int res5 = 0 ;
8310
- unsigned int val6 ;
8311
- int ecode6 = 0 ;
8516
+ int val2 ;
8517
+ int ecode2 = 0 ;
8312
8518
  VALUE vresult = Qnil;
8313
8519
 
8314
- if ((argc < 7) || (argc > 7)) {
8315
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 7)",argc); SWIG_fail;
8520
+ if ((argc < 3) || (argc > 3)) {
8521
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
8316
8522
  }
8317
8523
  res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
8318
8524
  if (!SWIG_IsOK(res1)) {
8319
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "memcached_mdelete_by_key" "', argument " "1"" of type '" "memcached_st *""'");
8525
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "memcached_callback_set" "', argument " "1"" of type '" "memcached_st *""'");
8320
8526
  }
8321
8527
  arg1 = (memcached_st *)(argp1);
8322
- res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
8323
- if (!SWIG_IsOK(res2)) {
8324
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "memcached_mdelete_by_key" "', argument " "2"" of type '" "char *""'");
8325
- }
8326
- arg2 = buf2;
8327
- ecode3 = SWIG_AsVal_size_t(argv[2], &val3);
8328
- if (!SWIG_IsOK(ecode3)) {
8329
- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "memcached_mdelete_by_key" "', argument " "3"" of type '" "size_t""'");
8330
- }
8331
- arg3 = (size_t)(val3);
8332
- res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_p_char, 0 | 0 );
8333
- if (!SWIG_IsOK(res4)) {
8334
- SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "memcached_mdelete_by_key" "', argument " "4"" of type '" "char **""'");
8335
- }
8336
- arg4 = (char **)(argp4);
8337
- res5 = SWIG_ConvertPtr(argv[4], &argp5,SWIGTYPE_p_size_t, 0 | 0 );
8338
- if (!SWIG_IsOK(res5)) {
8339
- SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "memcached_mdelete_by_key" "', argument " "5"" of type '" "size_t *""'");
8340
- }
8341
- arg5 = (size_t *)(argp5);
8342
- ecode6 = SWIG_AsVal_unsigned_SS_int(argv[5], &val6);
8343
- if (!SWIG_IsOK(ecode6)) {
8344
- SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "memcached_mdelete_by_key" "', argument " "6"" of type '" "unsigned int""'");
8528
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
8529
+ if (!SWIG_IsOK(ecode2)) {
8530
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "memcached_callback_set" "', argument " "2"" of type '" "memcached_callback""'");
8345
8531
  }
8346
- arg6 = (unsigned int)(val6);
8532
+ arg2 = (memcached_callback)(val2);
8347
8533
  {
8348
- if (NIL_P(argv[6]))
8349
- arg7 = (time_t)-1;
8350
- else
8351
- arg7 = NUM2LONG(rb_funcall(argv[6], rb_intern("tv_sec"), 0));
8534
+ int value = FIX2INT(argv[2]);
8535
+ if (value == 0 || value == 1) {
8536
+ arg3 = (void *) value;
8537
+ } else {
8538
+ // Only pass by reference for :distribution and :hash
8539
+ value = value - 2;
8540
+ arg3 = &value;
8541
+ }
8352
8542
  }
8353
- result = (memcached_return)memcached_mdelete_by_key(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
8543
+ result = (memcached_return)memcached_callback_set(arg1,arg2,arg3);
8354
8544
  vresult = SWIG_From_int((int)(result));
8355
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
8356
8545
  return vresult;
8357
8546
  fail:
8358
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
8359
8547
  return Qnil;
8360
8548
  }
8361
8549
 
8362
8550
 
8363
8551
  SWIGINTERN VALUE
8364
- _wrap_memcached_fetch_execute(int argc, VALUE *argv, VALUE self) {
8552
+ _wrap_memcached_callback_get(int argc, VALUE *argv, VALUE self) {
8365
8553
  memcached_st *arg1 = (memcached_st *) 0 ;
8366
- unsigned int (**arg2)(memcached_st *,memcached_result_st *,void *) ;
8367
- void *arg3 = (void *) 0 ;
8368
- unsigned int arg4 ;
8369
- memcached_return result;
8554
+ memcached_callback arg2 ;
8555
+ memcached_return *arg3 = (memcached_return *) 0 ;
8556
+ void *result = 0 ;
8370
8557
  void *argp1 = 0 ;
8371
8558
  int res1 = 0 ;
8372
- void *argp2 = 0 ;
8373
- int res2 = 0 ;
8374
- int res3 ;
8375
- unsigned int val4 ;
8376
- int ecode4 = 0 ;
8559
+ int val2 ;
8560
+ int ecode2 = 0 ;
8561
+ memcached_return temp3 ;
8562
+ int res3 = SWIG_TMPOBJ ;
8377
8563
  VALUE vresult = Qnil;
8378
8564
 
8379
- if ((argc < 4) || (argc > 4)) {
8380
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
8565
+ arg3 = &temp3;
8566
+ if ((argc < 2) || (argc > 2)) {
8567
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
8381
8568
  }
8382
8569
  res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
8383
8570
  if (!SWIG_IsOK(res1)) {
8384
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "memcached_fetch_execute" "', argument " "1"" of type '" "memcached_st *""'");
8571
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "memcached_callback_get" "', argument " "1"" of type '" "memcached_st *""'");
8385
8572
  }
8386
8573
  arg1 = (memcached_st *)(argp1);
8387
- res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_p_f_p_struct_memcached_st_p_struct_memcached_result_st_p_void__unsigned_int, 0 | 0 );
8388
- if (!SWIG_IsOK(res2)) {
8389
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "memcached_fetch_execute" "', argument " "2"" of type '" "unsigned int (*[])(memcached_st *,memcached_result_st *,void *)""'");
8574
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
8575
+ if (!SWIG_IsOK(ecode2)) {
8576
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "memcached_callback_get" "', argument " "2"" of type '" "memcached_callback""'");
8390
8577
  }
8391
- arg2 = (unsigned int (**)(memcached_st *,memcached_result_st *,void *))(argp2);
8392
- res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0);
8393
- if (!SWIG_IsOK(res3)) {
8394
- SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "memcached_fetch_execute" "', argument " "3"" of type '" "void *""'");
8578
+ arg2 = (memcached_callback)(val2);
8579
+ result = (void *)memcached_callback_get(arg1,arg2,arg3);
8580
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 );
8581
+ if (SWIG_IsTmpObj(res3)) {
8582
+ vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_unsigned_SS_short((*arg3)));
8583
+ } else {
8584
+ int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
8585
+ vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_memcached_return, new_flags));
8395
8586
  }
8396
- ecode4 = SWIG_AsVal_unsigned_SS_int(argv[3], &val4);
8397
- if (!SWIG_IsOK(ecode4)) {
8398
- SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "memcached_fetch_execute" "', argument " "4"" of type '" "unsigned int""'");
8399
- }
8400
- arg4 = (unsigned int)(val4);
8401
- result = (memcached_return)memcached_fetch_execute(arg1,arg2,arg3,arg4);
8402
- vresult = SWIG_From_int((int)(result));
8403
8587
  return vresult;
8404
8588
  fail:
8405
8589
  return Qnil;
@@ -8508,7 +8692,7 @@ fail:
8508
8692
 
8509
8693
 
8510
8694
  SWIGINTERN VALUE
8511
- _wrap_memcached_get_ruby_string(int argc, VALUE *argv, VALUE self) {
8695
+ _wrap_memcached_get_rvalue(int argc, VALUE *argv, VALUE self) {
8512
8696
  memcached_st *arg1 = (memcached_st *) 0 ;
8513
8697
  char *arg2 = (char *) 0 ;
8514
8698
  size_t arg3 ;
@@ -8530,15 +8714,72 @@ _wrap_memcached_get_ruby_string(int argc, VALUE *argv, VALUE self) {
8530
8714
  }
8531
8715
  res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
8532
8716
  if (!SWIG_IsOK(res1)) {
8533
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "memcached_get_ruby_string" "', argument " "1"" of type '" "memcached_st *""'");
8717
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "memcached_get_rvalue" "', argument " "1"" of type '" "memcached_st *""'");
8534
8718
  }
8535
8719
  arg1 = (memcached_st *)(argp1);
8536
8720
  {
8537
8721
  arg2 = STR2CSTR(argv[1]);
8538
8722
  arg3 = (size_t) RSTRING(argv[1])->len;
8539
8723
  }
8540
- result = (VALUE)memcached_get_ruby_string(arg1,arg2,arg3,arg4,arg5);
8724
+ result = (VALUE)memcached_get_rvalue(arg1,arg2,arg3,arg4,arg5);
8725
+ vresult = result;
8726
+ if (SWIG_IsTmpObj(res4)) {
8727
+ vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_unsigned_SS_int((*arg4)));
8728
+ } else {
8729
+ int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
8730
+ vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_uint32_t, new_flags));
8731
+ }
8732
+ if (SWIG_IsTmpObj(res5)) {
8733
+ vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_unsigned_SS_short((*arg5)));
8734
+ } else {
8735
+ int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
8736
+ vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_memcached_return, new_flags));
8737
+ }
8738
+ return vresult;
8739
+ fail:
8740
+ return Qnil;
8741
+ }
8742
+
8743
+
8744
+ SWIGINTERN VALUE
8745
+ _wrap_memcached_fetch_rvalue(int argc, VALUE *argv, VALUE self) {
8746
+ memcached_st *arg1 = (memcached_st *) 0 ;
8747
+ char *arg2 = (char *) 0 ;
8748
+ size_t *arg3 = (size_t *) 0 ;
8749
+ uint32_t *arg4 = (uint32_t *) 0 ;
8750
+ memcached_return *arg5 = (memcached_return *) 0 ;
8751
+ VALUE result;
8752
+ void *argp1 = 0 ;
8753
+ int res1 = 0 ;
8754
+ uint32_t temp4 ;
8755
+ int res4 = SWIG_TMPOBJ ;
8756
+ memcached_return temp5 ;
8757
+ int res5 = SWIG_TMPOBJ ;
8758
+ VALUE vresult = Qnil;
8759
+
8760
+ {
8761
+ arg2 = malloc(512*sizeof(char));
8762
+ arg3 = malloc(sizeof(size_t)); // XXX Could possibly be the address of a local
8763
+ }
8764
+ arg4 = &temp4;
8765
+ arg5 = &temp5;
8766
+ if ((argc < 1) || (argc > 1)) {
8767
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
8768
+ }
8769
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
8770
+ if (!SWIG_IsOK(res1)) {
8771
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "memcached_fetch_rvalue" "', argument " "1"" of type '" "memcached_st *""'");
8772
+ }
8773
+ arg1 = (memcached_st *)(argp1);
8774
+ result = (VALUE)memcached_fetch_rvalue(arg1,arg2,arg3,arg4,arg5);
8541
8775
  vresult = result;
8776
+ {
8777
+ if (arg2 != NULL) {
8778
+ rb_ary_push(vresult, rb_str_new(arg2, *arg3));
8779
+ free(arg2);
8780
+ free(arg3);
8781
+ }
8782
+ }
8542
8783
  if (SWIG_IsTmpObj(res4)) {
8543
8784
  vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_unsigned_SS_int((*arg4)));
8544
8785
  } else {
@@ -8557,6 +8798,59 @@ fail:
8557
8798
  }
8558
8799
 
8559
8800
 
8801
+ SWIGINTERN VALUE
8802
+ _wrap_memcached_stat_get_rvalue(int argc, VALUE *argv, VALUE self) {
8803
+ memcached_st *arg1 = (memcached_st *) 0 ;
8804
+ memcached_stat_st *arg2 = (memcached_stat_st *) 0 ;
8805
+ char *arg3 = (char *) 0 ;
8806
+ memcached_return *arg4 = (memcached_return *) 0 ;
8807
+ VALUE result;
8808
+ void *argp1 = 0 ;
8809
+ int res1 = 0 ;
8810
+ void *argp2 = 0 ;
8811
+ int res2 = 0 ;
8812
+ int res3 ;
8813
+ char *buf3 = 0 ;
8814
+ int alloc3 = 0 ;
8815
+ memcached_return temp4 ;
8816
+ int res4 = SWIG_TMPOBJ ;
8817
+ VALUE vresult = Qnil;
8818
+
8819
+ arg4 = &temp4;
8820
+ if ((argc < 3) || (argc > 3)) {
8821
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
8822
+ }
8823
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
8824
+ if (!SWIG_IsOK(res1)) {
8825
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "memcached_stat_get_rvalue" "', argument " "1"" of type '" "memcached_st *""'");
8826
+ }
8827
+ arg1 = (memcached_st *)(argp1);
8828
+ res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_memcached_stat_st, 0 | 0 );
8829
+ if (!SWIG_IsOK(res2)) {
8830
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "memcached_stat_get_rvalue" "', argument " "2"" of type '" "memcached_stat_st *""'");
8831
+ }
8832
+ arg2 = (memcached_stat_st *)(argp2);
8833
+ res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
8834
+ if (!SWIG_IsOK(res3)) {
8835
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "memcached_stat_get_rvalue" "', argument " "3"" of type '" "char *""'");
8836
+ }
8837
+ arg3 = buf3;
8838
+ result = (VALUE)memcached_stat_get_rvalue(arg1,arg2,arg3,arg4);
8839
+ vresult = result;
8840
+ if (SWIG_IsTmpObj(res4)) {
8841
+ vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_unsigned_SS_short((*arg4)));
8842
+ } else {
8843
+ int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
8844
+ vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_memcached_return, new_flags));
8845
+ }
8846
+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
8847
+ return vresult;
8848
+ fail:
8849
+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
8850
+ return Qnil;
8851
+ }
8852
+
8853
+
8560
8854
  SWIGINTERN VALUE
8561
8855
  _wrap_memcached_select_server_at(int argc, VALUE *argv, VALUE self) {
8562
8856
  memcached_st *arg1 = (memcached_st *) 0 ;
@@ -8629,43 +8923,20 @@ fail:
8629
8923
  }
8630
8924
 
8631
8925
 
8632
- SWIGINTERN VALUE
8633
- _wrap_memcached_repair_server_st(int argc, VALUE *argv, VALUE self) {
8634
- memcached_st *arg1 = (memcached_st *) 0 ;
8635
- memcached_server_st *arg2 = (memcached_server_st *) 0 ;
8636
- void *argp1 = 0 ;
8637
- int res1 = 0 ;
8638
- void *argp2 = 0 ;
8639
- int res2 = 0 ;
8640
-
8641
- if ((argc < 2) || (argc > 2)) {
8642
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
8643
- }
8644
- res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_memcached_st, 0 | 0 );
8645
- if (!SWIG_IsOK(res1)) {
8646
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "memcached_repair_server_st" "', argument " "1"" of type '" "memcached_st *""'");
8647
- }
8648
- arg1 = (memcached_st *)(argp1);
8649
- res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_memcached_server_st, 0 | 0 );
8650
- if (!SWIG_IsOK(res2)) {
8651
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "memcached_repair_server_st" "', argument " "2"" of type '" "memcached_server_st *""'");
8652
- }
8653
- arg2 = (memcached_server_st *)(argp2);
8654
- memcached_repair_server_st(arg1,arg2);
8655
- return Qnil;
8656
- fail:
8657
- return Qnil;
8658
- }
8659
-
8660
-
8661
8926
 
8662
8927
  /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
8663
8928
 
8664
8929
  static swig_type_info _swigt__p_addrinfo = {"_p_addrinfo", "struct addrinfo *", 0, 0, (void*)0, 0};
8665
8930
  static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
8931
+ static swig_type_info _swigt__p_f_p_struct_memcached_st__memcached_return = {"_p_f_p_struct_memcached_st__memcached_return", "enum memcached_return (*)(struct memcached_st *)|memcached_cleanup_func", 0, 0, (void*)0, 0};
8932
+ static swig_type_info _swigt__p_f_p_struct_memcached_st_p_struct_memcached_st__memcached_return = {"_p_f_p_struct_memcached_st_p_struct_memcached_st__memcached_return", "enum memcached_return (*)(struct memcached_st *,struct memcached_st *)|memcached_clone_func", 0, 0, (void*)0, 0};
8933
+ static swig_type_info _swigt__p_f_p_struct_memcached_st_p_void__void = {"_p_f_p_struct_memcached_st_p_void__void", "void (*)(struct memcached_st *,void *)|memcached_free_function", 0, 0, (void*)0, 0};
8934
+ static swig_type_info _swigt__p_f_p_struct_memcached_st_p_void_q_const__size_t__p_void = {"_p_f_p_struct_memcached_st_p_void_q_const__size_t__p_void", "void *(*)(struct memcached_st *,void *,size_t const)|memcached_realloc_function", 0, 0, (void*)0, 0};
8935
+ static swig_type_info _swigt__p_f_p_struct_memcached_st_q_const__size_t__p_void = {"_p_f_p_struct_memcached_st_q_const__size_t__p_void", "void *(*)(struct memcached_st *,size_t const)|memcached_malloc_function", 0, 0, (void*)0, 0};
8666
8936
  static swig_type_info _swigt__p_int32_t = {"_p_int32_t", "int32_t *", 0, 0, (void*)0, 0};
8667
8937
  static swig_type_info _swigt__p_memcached_allocated = {"_p_memcached_allocated", "enum memcached_allocated *|memcached_allocated *", 0, 0, (void*)0, 0};
8668
8938
  static swig_type_info _swigt__p_memcached_behavior = {"_p_memcached_behavior", "enum memcached_behavior *|memcached_behavior *", 0, 0, (void*)0, 0};
8939
+ static swig_type_info _swigt__p_memcached_callback = {"_p_memcached_callback", "enum memcached_callback *|memcached_callback *", 0, 0, (void*)0, 0};
8669
8940
  static swig_type_info _swigt__p_memcached_connection = {"_p_memcached_connection", "enum memcached_connection *|memcached_connection *", 0, 0, (void*)0, 0};
8670
8941
  static swig_type_info _swigt__p_memcached_hash = {"_p_memcached_hash", "enum memcached_hash *|memcached_hash *", 0, 0, (void*)0, 0};
8671
8942
  static swig_type_info _swigt__p_memcached_result_st = {"_p_memcached_result_st", "struct memcached_result_st *|memcached_result_st *", 0, 0, (void*)0, 0};
@@ -8687,9 +8958,15 @@ static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
8687
8958
  static swig_type_info *swig_type_initial[] = {
8688
8959
  &_swigt__p_addrinfo,
8689
8960
  &_swigt__p_char,
8961
+ &_swigt__p_f_p_struct_memcached_st__memcached_return,
8962
+ &_swigt__p_f_p_struct_memcached_st_p_struct_memcached_st__memcached_return,
8963
+ &_swigt__p_f_p_struct_memcached_st_p_void__void,
8964
+ &_swigt__p_f_p_struct_memcached_st_p_void_q_const__size_t__p_void,
8965
+ &_swigt__p_f_p_struct_memcached_st_q_const__size_t__p_void,
8690
8966
  &_swigt__p_int32_t,
8691
8967
  &_swigt__p_memcached_allocated,
8692
8968
  &_swigt__p_memcached_behavior,
8969
+ &_swigt__p_memcached_callback,
8693
8970
  &_swigt__p_memcached_connection,
8694
8971
  &_swigt__p_memcached_hash,
8695
8972
  &_swigt__p_memcached_result_st,
@@ -8711,9 +8988,15 @@ static swig_type_info *swig_type_initial[] = {
8711
8988
 
8712
8989
  static swig_cast_info _swigc__p_addrinfo[] = { {&_swigt__p_addrinfo, 0, 0, 0},{0, 0, 0, 0}};
8713
8990
  static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
8991
+ static swig_cast_info _swigc__p_f_p_struct_memcached_st__memcached_return[] = { {&_swigt__p_f_p_struct_memcached_st__memcached_return, 0, 0, 0},{0, 0, 0, 0}};
8992
+ static swig_cast_info _swigc__p_f_p_struct_memcached_st_p_struct_memcached_st__memcached_return[] = { {&_swigt__p_f_p_struct_memcached_st_p_struct_memcached_st__memcached_return, 0, 0, 0},{0, 0, 0, 0}};
8993
+ static swig_cast_info _swigc__p_f_p_struct_memcached_st_p_void__void[] = { {&_swigt__p_f_p_struct_memcached_st_p_void__void, 0, 0, 0},{0, 0, 0, 0}};
8994
+ static swig_cast_info _swigc__p_f_p_struct_memcached_st_p_void_q_const__size_t__p_void[] = { {&_swigt__p_f_p_struct_memcached_st_p_void_q_const__size_t__p_void, 0, 0, 0},{0, 0, 0, 0}};
8995
+ static swig_cast_info _swigc__p_f_p_struct_memcached_st_q_const__size_t__p_void[] = { {&_swigt__p_f_p_struct_memcached_st_q_const__size_t__p_void, 0, 0, 0},{0, 0, 0, 0}};
8714
8996
  static swig_cast_info _swigc__p_int32_t[] = { {&_swigt__p_int32_t, 0, 0, 0},{0, 0, 0, 0}};
8715
8997
  static swig_cast_info _swigc__p_memcached_allocated[] = { {&_swigt__p_memcached_allocated, 0, 0, 0},{0, 0, 0, 0}};
8716
8998
  static swig_cast_info _swigc__p_memcached_behavior[] = { {&_swigt__p_memcached_behavior, 0, 0, 0},{0, 0, 0, 0}};
8999
+ static swig_cast_info _swigc__p_memcached_callback[] = { {&_swigt__p_memcached_callback, 0, 0, 0},{0, 0, 0, 0}};
8717
9000
  static swig_cast_info _swigc__p_memcached_connection[] = { {&_swigt__p_memcached_connection, 0, 0, 0},{0, 0, 0, 0}};
8718
9001
  static swig_cast_info _swigc__p_memcached_hash[] = { {&_swigt__p_memcached_hash, 0, 0, 0},{0, 0, 0, 0}};
8719
9002
  static swig_cast_info _swigc__p_memcached_result_st[] = { {&_swigt__p_memcached_result_st, 0, 0, 0},{0, 0, 0, 0}};
@@ -8735,9 +9018,15 @@ static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0,
8735
9018
  static swig_cast_info *swig_cast_initial[] = {
8736
9019
  _swigc__p_addrinfo,
8737
9020
  _swigc__p_char,
9021
+ _swigc__p_f_p_struct_memcached_st__memcached_return,
9022
+ _swigc__p_f_p_struct_memcached_st_p_struct_memcached_st__memcached_return,
9023
+ _swigc__p_f_p_struct_memcached_st_p_void__void,
9024
+ _swigc__p_f_p_struct_memcached_st_p_void_q_const__size_t__p_void,
9025
+ _swigc__p_f_p_struct_memcached_st_q_const__size_t__p_void,
8738
9026
  _swigc__p_int32_t,
8739
9027
  _swigc__p_memcached_allocated,
8740
9028
  _swigc__p_memcached_behavior,
9029
+ _swigc__p_memcached_callback,
8741
9030
  _swigc__p_memcached_connection,
8742
9031
  _swigc__p_memcached_hash,
8743
9032
  _swigc__p_memcached_result_st,
@@ -8975,11 +9264,11 @@ SWIG_PropagateClientData(void) {
8975
9264
  #ifdef __cplusplus
8976
9265
  extern "C"
8977
9266
  #endif
8978
- SWIGEXPORT void Init_libmemcached(void) {
9267
+ SWIGEXPORT void Init_rlibmemcached(void) {
8979
9268
  size_t i;
8980
9269
 
8981
9270
  SWIG_InitRuntime();
8982
- mLibmemcached = rb_define_module("Libmemcached");
9271
+ mRlibmemcached = rb_define_module("Rlibmemcached");
8983
9272
 
8984
9273
  SWIG_InitializeModule(0);
8985
9274
  for (i = 0; i < swig_module.size; i++) {
@@ -8987,81 +9276,85 @@ SWIGEXPORT void Init_libmemcached(void) {
8987
9276
  }
8988
9277
 
8989
9278
  SWIG_RubyInitializeTrackings();
8990
- rb_define_const(mLibmemcached, "MEMCACHED_VERSION_STRING", SWIG_From_int((int)(12)));
8991
- rb_define_const(mLibmemcached, "MEMCACHED_DEFAULT_PORT", SWIG_From_int((int)(11211)));
8992
- rb_define_const(mLibmemcached, "MEMCACHED_DEFAULT_COMMAND_SIZE", SWIG_From_int((int)(350)));
8993
- rb_define_const(mLibmemcached, "SMALL_STRING_LEN", SWIG_From_int((int)(1024)));
8994
- rb_define_const(mLibmemcached, "HUGE_STRING_LEN", SWIG_From_int((int)(8196)));
8995
- rb_define_const(mLibmemcached, "MEMCACHED_MAX_KEY", SWIG_From_int((int)(251)));
8996
- rb_define_const(mLibmemcached, "MEMCACHED_MAX_BUFFER", SWIG_From_int((int)(8196)));
8997
- rb_define_const(mLibmemcached, "MEMCACHED_MAX_HOST_LENGTH", SWIG_From_int((int)(64)));
8998
- rb_define_const(mLibmemcached, "MEMCACHED_WHEEL_SIZE", SWIG_From_int((int)(1024)));
8999
- rb_define_const(mLibmemcached, "MEMCACHED_STRIDE", SWIG_From_int((int)(4)));
9000
- rb_define_const(mLibmemcached, "MEMCACHED_SUCCESS", SWIG_From_int((int)(MEMCACHED_SUCCESS)));
9001
- rb_define_const(mLibmemcached, "MEMCACHED_FAILURE", SWIG_From_int((int)(MEMCACHED_FAILURE)));
9002
- rb_define_const(mLibmemcached, "MEMCACHED_HOST_LOOKUP_FAILURE", SWIG_From_int((int)(MEMCACHED_HOST_LOOKUP_FAILURE)));
9003
- rb_define_const(mLibmemcached, "MEMCACHED_CONNECTION_FAILURE", SWIG_From_int((int)(MEMCACHED_CONNECTION_FAILURE)));
9004
- rb_define_const(mLibmemcached, "MEMCACHED_CONNECTION_BIND_FAILURE", SWIG_From_int((int)(MEMCACHED_CONNECTION_BIND_FAILURE)));
9005
- rb_define_const(mLibmemcached, "MEMCACHED_WRITE_FAILURE", SWIG_From_int((int)(MEMCACHED_WRITE_FAILURE)));
9006
- rb_define_const(mLibmemcached, "MEMCACHED_READ_FAILURE", SWIG_From_int((int)(MEMCACHED_READ_FAILURE)));
9007
- rb_define_const(mLibmemcached, "MEMCACHED_UNKNOWN_READ_FAILURE", SWIG_From_int((int)(MEMCACHED_UNKNOWN_READ_FAILURE)));
9008
- rb_define_const(mLibmemcached, "MEMCACHED_PROTOCOL_ERROR", SWIG_From_int((int)(MEMCACHED_PROTOCOL_ERROR)));
9009
- rb_define_const(mLibmemcached, "MEMCACHED_CLIENT_ERROR", SWIG_From_int((int)(MEMCACHED_CLIENT_ERROR)));
9010
- rb_define_const(mLibmemcached, "MEMCACHED_SERVER_ERROR", SWIG_From_int((int)(MEMCACHED_SERVER_ERROR)));
9011
- rb_define_const(mLibmemcached, "MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE", SWIG_From_int((int)(MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE)));
9012
- rb_define_const(mLibmemcached, "MEMCACHED_DATA_EXISTS", SWIG_From_int((int)(MEMCACHED_DATA_EXISTS)));
9013
- rb_define_const(mLibmemcached, "MEMCACHED_DATA_DOES_NOT_EXIST", SWIG_From_int((int)(MEMCACHED_DATA_DOES_NOT_EXIST)));
9014
- rb_define_const(mLibmemcached, "MEMCACHED_NOTSTORED", SWIG_From_int((int)(MEMCACHED_NOTSTORED)));
9015
- rb_define_const(mLibmemcached, "MEMCACHED_STORED", SWIG_From_int((int)(MEMCACHED_STORED)));
9016
- rb_define_const(mLibmemcached, "MEMCACHED_NOTFOUND", SWIG_From_int((int)(MEMCACHED_NOTFOUND)));
9017
- rb_define_const(mLibmemcached, "MEMCACHED_MEMORY_ALLOCATION_FAILURE", SWIG_From_int((int)(MEMCACHED_MEMORY_ALLOCATION_FAILURE)));
9018
- rb_define_const(mLibmemcached, "MEMCACHED_PARTIAL_READ", SWIG_From_int((int)(MEMCACHED_PARTIAL_READ)));
9019
- rb_define_const(mLibmemcached, "MEMCACHED_SOME_ERRORS", SWIG_From_int((int)(MEMCACHED_SOME_ERRORS)));
9020
- rb_define_const(mLibmemcached, "MEMCACHED_NO_SERVERS", SWIG_From_int((int)(MEMCACHED_NO_SERVERS)));
9021
- rb_define_const(mLibmemcached, "MEMCACHED_END", SWIG_From_int((int)(MEMCACHED_END)));
9022
- rb_define_const(mLibmemcached, "MEMCACHED_DELETED", SWIG_From_int((int)(MEMCACHED_DELETED)));
9023
- rb_define_const(mLibmemcached, "MEMCACHED_VALUE", SWIG_From_int((int)(MEMCACHED_VALUE)));
9024
- rb_define_const(mLibmemcached, "MEMCACHED_STAT", SWIG_From_int((int)(MEMCACHED_STAT)));
9025
- rb_define_const(mLibmemcached, "MEMCACHED_ERRNO", SWIG_From_int((int)(MEMCACHED_ERRNO)));
9026
- rb_define_const(mLibmemcached, "MEMCACHED_FAIL_UNIX_SOCKET", SWIG_From_int((int)(MEMCACHED_FAIL_UNIX_SOCKET)));
9027
- rb_define_const(mLibmemcached, "MEMCACHED_NOT_SUPPORTED", SWIG_From_int((int)(MEMCACHED_NOT_SUPPORTED)));
9028
- rb_define_const(mLibmemcached, "MEMCACHED_NO_KEY_PROVIDED", SWIG_From_int((int)(MEMCACHED_NO_KEY_PROVIDED)));
9029
- rb_define_const(mLibmemcached, "MEMCACHED_FETCH_NOTFINISHED", SWIG_From_int((int)(MEMCACHED_FETCH_NOTFINISHED)));
9030
- rb_define_const(mLibmemcached, "MEMCACHED_TIMEOUT", SWIG_From_int((int)(MEMCACHED_TIMEOUT)));
9031
- rb_define_const(mLibmemcached, "MEMCACHED_BUFFERED", SWIG_From_int((int)(MEMCACHED_BUFFERED)));
9032
- rb_define_const(mLibmemcached, "MEMCACHED_MAXIMUM_RETURN", SWIG_From_int((int)(MEMCACHED_MAXIMUM_RETURN)));
9033
- rb_define_const(mLibmemcached, "MEMCACHED_DISTRIBUTION_MODULA", SWIG_From_int((int)(MEMCACHED_DISTRIBUTION_MODULA)));
9034
- rb_define_const(mLibmemcached, "MEMCACHED_DISTRIBUTION_CONSISTENT", SWIG_From_int((int)(MEMCACHED_DISTRIBUTION_CONSISTENT)));
9035
- rb_define_const(mLibmemcached, "MEMCACHED_BEHAVIOR_NO_BLOCK", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_NO_BLOCK)));
9036
- rb_define_const(mLibmemcached, "MEMCACHED_BEHAVIOR_TCP_NODELAY", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_TCP_NODELAY)));
9037
- rb_define_const(mLibmemcached, "MEMCACHED_BEHAVIOR_HASH", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_HASH)));
9038
- rb_define_const(mLibmemcached, "MEMCACHED_BEHAVIOR_KETAMA", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_KETAMA)));
9039
- rb_define_const(mLibmemcached, "MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE)));
9040
- rb_define_const(mLibmemcached, "MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE)));
9041
- rb_define_const(mLibmemcached, "MEMCACHED_BEHAVIOR_CACHE_LOOKUPS", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_CACHE_LOOKUPS)));
9042
- rb_define_const(mLibmemcached, "MEMCACHED_BEHAVIOR_SUPPORT_CAS", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_SUPPORT_CAS)));
9043
- rb_define_const(mLibmemcached, "MEMCACHED_BEHAVIOR_POLL_TIMEOUT", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_POLL_TIMEOUT)));
9044
- rb_define_const(mLibmemcached, "MEMCACHED_BEHAVIOR_DISTRIBUTION", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_DISTRIBUTION)));
9045
- rb_define_const(mLibmemcached, "MEMCACHED_BEHAVIOR_BUFFER_REQUESTS", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_BUFFER_REQUESTS)));
9046
- rb_define_const(mLibmemcached, "MEMCACHED_BEHAVIOR_USER_DATA", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_USER_DATA)));
9047
- rb_define_const(mLibmemcached, "MEMCACHED_HASH_DEFAULT", SWIG_From_int((int)(MEMCACHED_HASH_DEFAULT)));
9048
- rb_define_const(mLibmemcached, "MEMCACHED_HASH_MD5", SWIG_From_int((int)(MEMCACHED_HASH_MD5)));
9049
- rb_define_const(mLibmemcached, "MEMCACHED_HASH_CRC", SWIG_From_int((int)(MEMCACHED_HASH_CRC)));
9050
- rb_define_const(mLibmemcached, "MEMCACHED_HASH_FNV1_64", SWIG_From_int((int)(MEMCACHED_HASH_FNV1_64)));
9051
- rb_define_const(mLibmemcached, "MEMCACHED_HASH_FNV1A_64", SWIG_From_int((int)(MEMCACHED_HASH_FNV1A_64)));
9052
- rb_define_const(mLibmemcached, "MEMCACHED_HASH_FNV1_32", SWIG_From_int((int)(MEMCACHED_HASH_FNV1_32)));
9053
- rb_define_const(mLibmemcached, "MEMCACHED_HASH_FNV1A_32", SWIG_From_int((int)(MEMCACHED_HASH_FNV1A_32)));
9054
- rb_define_const(mLibmemcached, "MEMCACHED_HASH_KETAMA", SWIG_From_int((int)(MEMCACHED_HASH_KETAMA)));
9055
- rb_define_const(mLibmemcached, "MEMCACHED_HASH_HSIEH", SWIG_From_int((int)(MEMCACHED_HASH_HSIEH)));
9056
- rb_define_const(mLibmemcached, "MEMCACHED_CONNECTION_UNKNOWN", SWIG_From_int((int)(MEMCACHED_CONNECTION_UNKNOWN)));
9057
- rb_define_const(mLibmemcached, "MEMCACHED_CONNECTION_TCP", SWIG_From_int((int)(MEMCACHED_CONNECTION_TCP)));
9058
- rb_define_const(mLibmemcached, "MEMCACHED_CONNECTION_UDP", SWIG_From_int((int)(MEMCACHED_CONNECTION_UDP)));
9059
- rb_define_const(mLibmemcached, "MEMCACHED_CONNECTION_UNIX_SOCKET", SWIG_From_int((int)(MEMCACHED_CONNECTION_UNIX_SOCKET)));
9060
- rb_define_const(mLibmemcached, "MEMCACHED_NOT_ALLOCATED", SWIG_From_int((int)(MEMCACHED_NOT_ALLOCATED)));
9061
- rb_define_const(mLibmemcached, "MEMCACHED_ALLOCATED", SWIG_From_int((int)(MEMCACHED_ALLOCATED)));
9062
- rb_define_const(mLibmemcached, "MEMCACHED_USED", SWIG_From_int((int)(MEMCACHED_USED)));
9063
-
9064
- cMemcachedServerSt.klass = rb_define_class_under(mLibmemcached, "MemcachedServerSt", rb_cObject);
9279
+ rb_define_const(mRlibmemcached, "MEMCACHED_VERSION_STRING_LENGTH", SWIG_From_int((int)(12)));
9280
+ rb_define_const(mRlibmemcached, "MEMCACHED_DEFAULT_PORT", SWIG_From_int((int)(11211)));
9281
+ rb_define_const(mRlibmemcached, "MEMCACHED_MAX_KEY", SWIG_From_int((int)(251)));
9282
+ rb_define_const(mRlibmemcached, "MEMCACHED_MAX_BUFFER", SWIG_From_int((int)(8196)));
9283
+ rb_define_const(mRlibmemcached, "MEMCACHED_MAX_HOST_LENGTH", SWIG_From_int((int)(64)));
9284
+ rb_define_const(mRlibmemcached, "MEMCACHED_WHEEL_SIZE", SWIG_From_int((int)(1024)));
9285
+ rb_define_const(mRlibmemcached, "MEMCACHED_STRIDE", SWIG_From_int((int)(4)));
9286
+ rb_define_const(mRlibmemcached, "LIBMEMCACHED_VERSION_STRING", SWIG_FromCharPtr("0.14"));
9287
+ rb_define_const(mRlibmemcached, "MEMCACHED_SUCCESS", SWIG_From_int((int)(MEMCACHED_SUCCESS)));
9288
+ rb_define_const(mRlibmemcached, "MEMCACHED_FAILURE", SWIG_From_int((int)(MEMCACHED_FAILURE)));
9289
+ rb_define_const(mRlibmemcached, "MEMCACHED_HOST_LOOKUP_FAILURE", SWIG_From_int((int)(MEMCACHED_HOST_LOOKUP_FAILURE)));
9290
+ rb_define_const(mRlibmemcached, "MEMCACHED_CONNECTION_FAILURE", SWIG_From_int((int)(MEMCACHED_CONNECTION_FAILURE)));
9291
+ rb_define_const(mRlibmemcached, "MEMCACHED_CONNECTION_BIND_FAILURE", SWIG_From_int((int)(MEMCACHED_CONNECTION_BIND_FAILURE)));
9292
+ rb_define_const(mRlibmemcached, "MEMCACHED_WRITE_FAILURE", SWIG_From_int((int)(MEMCACHED_WRITE_FAILURE)));
9293
+ rb_define_const(mRlibmemcached, "MEMCACHED_READ_FAILURE", SWIG_From_int((int)(MEMCACHED_READ_FAILURE)));
9294
+ rb_define_const(mRlibmemcached, "MEMCACHED_UNKNOWN_READ_FAILURE", SWIG_From_int((int)(MEMCACHED_UNKNOWN_READ_FAILURE)));
9295
+ rb_define_const(mRlibmemcached, "MEMCACHED_PROTOCOL_ERROR", SWIG_From_int((int)(MEMCACHED_PROTOCOL_ERROR)));
9296
+ rb_define_const(mRlibmemcached, "MEMCACHED_CLIENT_ERROR", SWIG_From_int((int)(MEMCACHED_CLIENT_ERROR)));
9297
+ rb_define_const(mRlibmemcached, "MEMCACHED_SERVER_ERROR", SWIG_From_int((int)(MEMCACHED_SERVER_ERROR)));
9298
+ rb_define_const(mRlibmemcached, "MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE", SWIG_From_int((int)(MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE)));
9299
+ rb_define_const(mRlibmemcached, "MEMCACHED_DATA_EXISTS", SWIG_From_int((int)(MEMCACHED_DATA_EXISTS)));
9300
+ rb_define_const(mRlibmemcached, "MEMCACHED_DATA_DOES_NOT_EXIST", SWIG_From_int((int)(MEMCACHED_DATA_DOES_NOT_EXIST)));
9301
+ rb_define_const(mRlibmemcached, "MEMCACHED_NOTSTORED", SWIG_From_int((int)(MEMCACHED_NOTSTORED)));
9302
+ rb_define_const(mRlibmemcached, "MEMCACHED_STORED", SWIG_From_int((int)(MEMCACHED_STORED)));
9303
+ rb_define_const(mRlibmemcached, "MEMCACHED_NOTFOUND", SWIG_From_int((int)(MEMCACHED_NOTFOUND)));
9304
+ rb_define_const(mRlibmemcached, "MEMCACHED_MEMORY_ALLOCATION_FAILURE", SWIG_From_int((int)(MEMCACHED_MEMORY_ALLOCATION_FAILURE)));
9305
+ rb_define_const(mRlibmemcached, "MEMCACHED_PARTIAL_READ", SWIG_From_int((int)(MEMCACHED_PARTIAL_READ)));
9306
+ rb_define_const(mRlibmemcached, "MEMCACHED_SOME_ERRORS", SWIG_From_int((int)(MEMCACHED_SOME_ERRORS)));
9307
+ rb_define_const(mRlibmemcached, "MEMCACHED_NO_SERVERS", SWIG_From_int((int)(MEMCACHED_NO_SERVERS)));
9308
+ rb_define_const(mRlibmemcached, "MEMCACHED_END", SWIG_From_int((int)(MEMCACHED_END)));
9309
+ rb_define_const(mRlibmemcached, "MEMCACHED_DELETED", SWIG_From_int((int)(MEMCACHED_DELETED)));
9310
+ rb_define_const(mRlibmemcached, "MEMCACHED_VALUE", SWIG_From_int((int)(MEMCACHED_VALUE)));
9311
+ rb_define_const(mRlibmemcached, "MEMCACHED_STAT", SWIG_From_int((int)(MEMCACHED_STAT)));
9312
+ rb_define_const(mRlibmemcached, "MEMCACHED_ERRNO", SWIG_From_int((int)(MEMCACHED_ERRNO)));
9313
+ rb_define_const(mRlibmemcached, "MEMCACHED_FAIL_UNIX_SOCKET", SWIG_From_int((int)(MEMCACHED_FAIL_UNIX_SOCKET)));
9314
+ rb_define_const(mRlibmemcached, "MEMCACHED_NOT_SUPPORTED", SWIG_From_int((int)(MEMCACHED_NOT_SUPPORTED)));
9315
+ rb_define_const(mRlibmemcached, "MEMCACHED_NO_KEY_PROVIDED", SWIG_From_int((int)(MEMCACHED_NO_KEY_PROVIDED)));
9316
+ rb_define_const(mRlibmemcached, "MEMCACHED_FETCH_NOTFINISHED", SWIG_From_int((int)(MEMCACHED_FETCH_NOTFINISHED)));
9317
+ rb_define_const(mRlibmemcached, "MEMCACHED_TIMEOUT", SWIG_From_int((int)(MEMCACHED_TIMEOUT)));
9318
+ rb_define_const(mRlibmemcached, "MEMCACHED_BUFFERED", SWIG_From_int((int)(MEMCACHED_BUFFERED)));
9319
+ rb_define_const(mRlibmemcached, "MEMCACHED_MAXIMUM_RETURN", SWIG_From_int((int)(MEMCACHED_MAXIMUM_RETURN)));
9320
+ rb_define_const(mRlibmemcached, "MEMCACHED_DISTRIBUTION_MODULA", SWIG_From_int((int)(MEMCACHED_DISTRIBUTION_MODULA)));
9321
+ rb_define_const(mRlibmemcached, "MEMCACHED_DISTRIBUTION_CONSISTENT", SWIG_From_int((int)(MEMCACHED_DISTRIBUTION_CONSISTENT)));
9322
+ rb_define_const(mRlibmemcached, "MEMCACHED_BEHAVIOR_NO_BLOCK", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_NO_BLOCK)));
9323
+ rb_define_const(mRlibmemcached, "MEMCACHED_BEHAVIOR_TCP_NODELAY", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_TCP_NODELAY)));
9324
+ rb_define_const(mRlibmemcached, "MEMCACHED_BEHAVIOR_HASH", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_HASH)));
9325
+ rb_define_const(mRlibmemcached, "MEMCACHED_BEHAVIOR_KETAMA", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_KETAMA)));
9326
+ rb_define_const(mRlibmemcached, "MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE)));
9327
+ rb_define_const(mRlibmemcached, "MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE)));
9328
+ rb_define_const(mRlibmemcached, "MEMCACHED_BEHAVIOR_CACHE_LOOKUPS", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_CACHE_LOOKUPS)));
9329
+ rb_define_const(mRlibmemcached, "MEMCACHED_BEHAVIOR_SUPPORT_CAS", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_SUPPORT_CAS)));
9330
+ rb_define_const(mRlibmemcached, "MEMCACHED_BEHAVIOR_POLL_TIMEOUT", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_POLL_TIMEOUT)));
9331
+ rb_define_const(mRlibmemcached, "MEMCACHED_BEHAVIOR_DISTRIBUTION", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_DISTRIBUTION)));
9332
+ rb_define_const(mRlibmemcached, "MEMCACHED_BEHAVIOR_BUFFER_REQUESTS", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_BUFFER_REQUESTS)));
9333
+ rb_define_const(mRlibmemcached, "MEMCACHED_BEHAVIOR_USER_DATA", SWIG_From_int((int)(MEMCACHED_BEHAVIOR_USER_DATA)));
9334
+ rb_define_const(mRlibmemcached, "MEMCACHED_CALLBACK_USER_DATA", SWIG_From_int((int)(MEMCACHED_CALLBACK_USER_DATA)));
9335
+ rb_define_const(mRlibmemcached, "MEMCACHED_CALLBACK_CLEANUP_FUNCTION", SWIG_From_int((int)(MEMCACHED_CALLBACK_CLEANUP_FUNCTION)));
9336
+ rb_define_const(mRlibmemcached, "MEMCACHED_CALLBACK_CLONE_FUNCTION", SWIG_From_int((int)(MEMCACHED_CALLBACK_CLONE_FUNCTION)));
9337
+ rb_define_const(mRlibmemcached, "MEMCACHED_CALLBACK_MALLOC_FUNCTION", SWIG_From_int((int)(MEMCACHED_CALLBACK_MALLOC_FUNCTION)));
9338
+ rb_define_const(mRlibmemcached, "MEMCACHED_CALLBACK_REALLOC_FUNCTION", SWIG_From_int((int)(MEMCACHED_CALLBACK_REALLOC_FUNCTION)));
9339
+ rb_define_const(mRlibmemcached, "MEMCACHED_CALLBACK_FREE_FUNCTION", SWIG_From_int((int)(MEMCACHED_CALLBACK_FREE_FUNCTION)));
9340
+ rb_define_const(mRlibmemcached, "MEMCACHED_HASH_DEFAULT", SWIG_From_int((int)(MEMCACHED_HASH_DEFAULT)));
9341
+ rb_define_const(mRlibmemcached, "MEMCACHED_HASH_MD5", SWIG_From_int((int)(MEMCACHED_HASH_MD5)));
9342
+ rb_define_const(mRlibmemcached, "MEMCACHED_HASH_CRC", SWIG_From_int((int)(MEMCACHED_HASH_CRC)));
9343
+ rb_define_const(mRlibmemcached, "MEMCACHED_HASH_FNV1_64", SWIG_From_int((int)(MEMCACHED_HASH_FNV1_64)));
9344
+ rb_define_const(mRlibmemcached, "MEMCACHED_HASH_FNV1A_64", SWIG_From_int((int)(MEMCACHED_HASH_FNV1A_64)));
9345
+ rb_define_const(mRlibmemcached, "MEMCACHED_HASH_FNV1_32", SWIG_From_int((int)(MEMCACHED_HASH_FNV1_32)));
9346
+ rb_define_const(mRlibmemcached, "MEMCACHED_HASH_FNV1A_32", SWIG_From_int((int)(MEMCACHED_HASH_FNV1A_32)));
9347
+ rb_define_const(mRlibmemcached, "MEMCACHED_HASH_KETAMA", SWIG_From_int((int)(MEMCACHED_HASH_KETAMA)));
9348
+ rb_define_const(mRlibmemcached, "MEMCACHED_HASH_HSIEH", SWIG_From_int((int)(MEMCACHED_HASH_HSIEH)));
9349
+ rb_define_const(mRlibmemcached, "MEMCACHED_CONNECTION_UNKNOWN", SWIG_From_int((int)(MEMCACHED_CONNECTION_UNKNOWN)));
9350
+ rb_define_const(mRlibmemcached, "MEMCACHED_CONNECTION_TCP", SWIG_From_int((int)(MEMCACHED_CONNECTION_TCP)));
9351
+ rb_define_const(mRlibmemcached, "MEMCACHED_CONNECTION_UDP", SWIG_From_int((int)(MEMCACHED_CONNECTION_UDP)));
9352
+ rb_define_const(mRlibmemcached, "MEMCACHED_CONNECTION_UNIX_SOCKET", SWIG_From_int((int)(MEMCACHED_CONNECTION_UNIX_SOCKET)));
9353
+ rb_define_const(mRlibmemcached, "MEMCACHED_NOT_ALLOCATED", SWIG_From_int((int)(MEMCACHED_NOT_ALLOCATED)));
9354
+ rb_define_const(mRlibmemcached, "MEMCACHED_ALLOCATED", SWIG_From_int((int)(MEMCACHED_ALLOCATED)));
9355
+ rb_define_const(mRlibmemcached, "MEMCACHED_USED", SWIG_From_int((int)(MEMCACHED_USED)));
9356
+
9357
+ cMemcachedServerSt.klass = rb_define_class_under(mRlibmemcached, "MemcachedServerSt", rb_cObject);
9065
9358
  SWIG_TypeClientData(SWIGTYPE_p_memcached_server_st, (void *) &cMemcachedServerSt);
9066
9359
  rb_define_alloc_func(cMemcachedServerSt.klass, _wrap_MemcachedServerSt_allocate);
9067
9360
  rb_define_method(cMemcachedServerSt.klass, "initialize", _wrap_new_MemcachedServerSt, -1);
@@ -9071,14 +9364,14 @@ SWIGEXPORT void Init_libmemcached(void) {
9071
9364
  rb_define_method(cMemcachedServerSt.klass, "port", _wrap_MemcachedServerSt_port_get, -1);
9072
9365
  rb_define_method(cMemcachedServerSt.klass, "fd=", _wrap_MemcachedServerSt_fd_set, -1);
9073
9366
  rb_define_method(cMemcachedServerSt.klass, "fd", _wrap_MemcachedServerSt_fd_get, -1);
9367
+ rb_define_method(cMemcachedServerSt.klass, "cached_errno=", _wrap_MemcachedServerSt_cached_errno_set, -1);
9368
+ rb_define_method(cMemcachedServerSt.klass, "cached_errno", _wrap_MemcachedServerSt_cached_errno_get, -1);
9074
9369
  rb_define_method(cMemcachedServerSt.klass, "cursor_active=", _wrap_MemcachedServerSt_cursor_active_set, -1);
9075
9370
  rb_define_method(cMemcachedServerSt.klass, "cursor_active", _wrap_MemcachedServerSt_cursor_active_get, -1);
9076
9371
  rb_define_method(cMemcachedServerSt.klass, "write_buffer=", _wrap_MemcachedServerSt_write_buffer_set, -1);
9077
9372
  rb_define_method(cMemcachedServerSt.klass, "write_buffer", _wrap_MemcachedServerSt_write_buffer_get, -1);
9078
9373
  rb_define_method(cMemcachedServerSt.klass, "write_buffer_offset=", _wrap_MemcachedServerSt_write_buffer_offset_set, -1);
9079
9374
  rb_define_method(cMemcachedServerSt.klass, "write_buffer_offset", _wrap_MemcachedServerSt_write_buffer_offset_get, -1);
9080
- rb_define_method(cMemcachedServerSt.klass, "write_ptr=", _wrap_MemcachedServerSt_write_ptr_set, -1);
9081
- rb_define_method(cMemcachedServerSt.klass, "write_ptr", _wrap_MemcachedServerSt_write_ptr_get, -1);
9082
9375
  rb_define_method(cMemcachedServerSt.klass, "read_buffer=", _wrap_MemcachedServerSt_read_buffer_set, -1);
9083
9376
  rb_define_method(cMemcachedServerSt.klass, "read_buffer", _wrap_MemcachedServerSt_read_buffer_get, -1);
9084
9377
  rb_define_method(cMemcachedServerSt.klass, "read_data_length=", _wrap_MemcachedServerSt_read_data_length_set, -1);
@@ -9101,11 +9394,13 @@ SWIGEXPORT void Init_libmemcached(void) {
9101
9394
  rb_define_method(cMemcachedServerSt.klass, "micro_version", _wrap_MemcachedServerSt_micro_version_get, -1);
9102
9395
  rb_define_method(cMemcachedServerSt.klass, "count=", _wrap_MemcachedServerSt_count_set, -1);
9103
9396
  rb_define_method(cMemcachedServerSt.klass, "count", _wrap_MemcachedServerSt_count_get, -1);
9397
+ rb_define_method(cMemcachedServerSt.klass, "root=", _wrap_MemcachedServerSt_root_set, -1);
9398
+ rb_define_method(cMemcachedServerSt.klass, "root", _wrap_MemcachedServerSt_root_get, -1);
9104
9399
  cMemcachedServerSt.mark = 0;
9105
9400
  cMemcachedServerSt.destroy = (void (*)(void *)) free_memcached_server_st;
9106
9401
  cMemcachedServerSt.trackObjects = 0;
9107
9402
 
9108
- cMemcachedStatSt.klass = rb_define_class_under(mLibmemcached, "MemcachedStatSt", rb_cObject);
9403
+ cMemcachedStatSt.klass = rb_define_class_under(mRlibmemcached, "MemcachedStatSt", rb_cObject);
9109
9404
  SWIG_TypeClientData(SWIGTYPE_p_memcached_stat_st, (void *) &cMemcachedStatSt);
9110
9405
  rb_define_alloc_func(cMemcachedStatSt.klass, _wrap_MemcachedStatSt_allocate);
9111
9406
  rb_define_method(cMemcachedStatSt.klass, "initialize", _wrap_new_MemcachedStatSt, -1);
@@ -9161,7 +9456,7 @@ SWIGEXPORT void Init_libmemcached(void) {
9161
9456
  cMemcachedStatSt.destroy = (void (*)(void *)) free_memcached_stat_st;
9162
9457
  cMemcachedStatSt.trackObjects = 0;
9163
9458
 
9164
- cMemcachedStringSt.klass = rb_define_class_under(mLibmemcached, "MemcachedStringSt", rb_cObject);
9459
+ cMemcachedStringSt.klass = rb_define_class_under(mRlibmemcached, "MemcachedStringSt", rb_cObject);
9165
9460
  SWIG_TypeClientData(SWIGTYPE_p_memcached_string_st, (void *) &cMemcachedStringSt);
9166
9461
  rb_define_alloc_func(cMemcachedStringSt.klass, _wrap_MemcachedStringSt_allocate);
9167
9462
  rb_define_method(cMemcachedStringSt.klass, "initialize", _wrap_new_MemcachedStringSt, -1);
@@ -9181,7 +9476,7 @@ SWIGEXPORT void Init_libmemcached(void) {
9181
9476
  cMemcachedStringSt.destroy = (void (*)(void *)) free_memcached_string_st;
9182
9477
  cMemcachedStringSt.trackObjects = 0;
9183
9478
 
9184
- cMemcachedResultSt.klass = rb_define_class_under(mLibmemcached, "MemcachedResultSt", rb_cObject);
9479
+ cMemcachedResultSt.klass = rb_define_class_under(mRlibmemcached, "MemcachedResultSt", rb_cObject);
9185
9480
  SWIG_TypeClientData(SWIGTYPE_p_memcached_result_st, (void *) &cMemcachedResultSt);
9186
9481
  rb_define_alloc_func(cMemcachedResultSt.klass, _wrap_MemcachedResultSt_allocate);
9187
9482
  rb_define_method(cMemcachedResultSt.klass, "initialize", _wrap_new_MemcachedResultSt, -1);
@@ -9203,7 +9498,7 @@ SWIGEXPORT void Init_libmemcached(void) {
9203
9498
  cMemcachedResultSt.destroy = (void (*)(void *)) free_memcached_result_st;
9204
9499
  cMemcachedResultSt.trackObjects = 0;
9205
9500
 
9206
- cMemcachedSt.klass = rb_define_class_under(mLibmemcached, "MemcachedSt", rb_cObject);
9501
+ cMemcachedSt.klass = rb_define_class_under(mRlibmemcached, "MemcachedSt", rb_cObject);
9207
9502
  SWIG_TypeClientData(SWIGTYPE_p_memcached_st, (void *) &cMemcachedSt);
9208
9503
  rb_define_alloc_func(cMemcachedSt.klass, _wrap_MemcachedSt_allocate);
9209
9504
  rb_define_method(cMemcachedSt.klass, "initialize", _wrap_new_MemcachedSt, -1);
@@ -9215,8 +9510,6 @@ SWIGEXPORT void Init_libmemcached(void) {
9215
9510
  rb_define_method(cMemcachedSt.klass, "number_of_hosts", _wrap_MemcachedSt_number_of_hosts_get, -1);
9216
9511
  rb_define_method(cMemcachedSt.klass, "cursor_server=", _wrap_MemcachedSt_cursor_server_set, -1);
9217
9512
  rb_define_method(cMemcachedSt.klass, "cursor_server", _wrap_MemcachedSt_cursor_server_get, -1);
9218
- rb_define_method(cMemcachedSt.klass, "connected=", _wrap_MemcachedSt_connected_set, -1);
9219
- rb_define_method(cMemcachedSt.klass, "connected", _wrap_MemcachedSt_connected_get, -1);
9220
9513
  rb_define_method(cMemcachedSt.klass, "cached_errno=", _wrap_MemcachedSt_cached_errno_set, -1);
9221
9514
  rb_define_method(cMemcachedSt.klass, "cached_errno", _wrap_MemcachedSt_cached_errno_get, -1);
9222
9515
  rb_define_method(cMemcachedSt.klass, "flags=", _wrap_MemcachedSt_flags_set, -1);
@@ -9237,63 +9530,75 @@ SWIGEXPORT void Init_libmemcached(void) {
9237
9530
  rb_define_method(cMemcachedSt.klass, "user_data", _wrap_MemcachedSt_user_data_get, -1);
9238
9531
  rb_define_method(cMemcachedSt.klass, "wheel=", _wrap_MemcachedSt_wheel_set, -1);
9239
9532
  rb_define_method(cMemcachedSt.klass, "wheel", _wrap_MemcachedSt_wheel_get, -1);
9533
+ rb_define_method(cMemcachedSt.klass, "on_clone=", _wrap_MemcachedSt_on_clone_set, -1);
9534
+ rb_define_method(cMemcachedSt.klass, "on_clone", _wrap_MemcachedSt_on_clone_get, -1);
9535
+ rb_define_method(cMemcachedSt.klass, "on_cleanup=", _wrap_MemcachedSt_on_cleanup_set, -1);
9536
+ rb_define_method(cMemcachedSt.klass, "on_cleanup", _wrap_MemcachedSt_on_cleanup_get, -1);
9537
+ rb_define_method(cMemcachedSt.klass, "call_free=", _wrap_MemcachedSt_call_free_set, -1);
9538
+ rb_define_method(cMemcachedSt.klass, "call_free", _wrap_MemcachedSt_call_free_get, -1);
9539
+ rb_define_method(cMemcachedSt.klass, "call_malloc=", _wrap_MemcachedSt_call_malloc_set, -1);
9540
+ rb_define_method(cMemcachedSt.klass, "call_malloc", _wrap_MemcachedSt_call_malloc_get, -1);
9541
+ rb_define_method(cMemcachedSt.klass, "call_realloc=", _wrap_MemcachedSt_call_realloc_set, -1);
9542
+ rb_define_method(cMemcachedSt.klass, "call_realloc", _wrap_MemcachedSt_call_realloc_get, -1);
9240
9543
  cMemcachedSt.mark = 0;
9241
9544
  cMemcachedSt.destroy = (void (*)(void *)) free_memcached_st;
9242
9545
  cMemcachedSt.trackObjects = 0;
9243
- rb_define_module_function(mLibmemcached, "memcached_create", _wrap_memcached_create, -1);
9244
- rb_define_module_function(mLibmemcached, "memcached_free", _wrap_memcached_free, -1);
9245
- rb_define_module_function(mLibmemcached, "memcached_clone", _wrap_memcached_clone, -1);
9246
- rb_define_module_function(mLibmemcached, "memcached_delete", _wrap_memcached_delete, -1);
9247
- rb_define_module_function(mLibmemcached, "memcached_increment", _wrap_memcached_increment, -1);
9248
- rb_define_module_function(mLibmemcached, "memcached_decrement", _wrap_memcached_decrement, -1);
9249
- rb_define_module_function(mLibmemcached, "memcached_stat_free", _wrap_memcached_stat_free, -1);
9250
- rb_define_module_function(mLibmemcached, "memcached_stat", _wrap_memcached_stat, -1);
9251
- rb_define_module_function(mLibmemcached, "memcached_stat_servername", _wrap_memcached_stat_servername, -1);
9252
- rb_define_module_function(mLibmemcached, "memcached_flush", _wrap_memcached_flush, -1);
9253
- rb_define_module_function(mLibmemcached, "memcached_verbosity", _wrap_memcached_verbosity, -1);
9254
- rb_define_module_function(mLibmemcached, "memcached_quit", _wrap_memcached_quit, -1);
9255
- rb_define_module_function(mLibmemcached, "memcached_strerror", _wrap_memcached_strerror, -1);
9256
- rb_define_module_function(mLibmemcached, "memcached_behavior_set", _wrap_memcached_behavior_set, -1);
9257
- rb_define_module_function(mLibmemcached, "memcached_behavior_get", _wrap_memcached_behavior_get, -1);
9258
- rb_define_module_function(mLibmemcached, "memcached_set", _wrap_memcached_set, -1);
9259
- rb_define_module_function(mLibmemcached, "memcached_add", _wrap_memcached_add, -1);
9260
- rb_define_module_function(mLibmemcached, "memcached_replace", _wrap_memcached_replace, -1);
9261
- rb_define_module_function(mLibmemcached, "memcached_append", _wrap_memcached_append, -1);
9262
- rb_define_module_function(mLibmemcached, "memcached_prepend", _wrap_memcached_prepend, -1);
9263
- rb_define_module_function(mLibmemcached, "memcached_cas", _wrap_memcached_cas, -1);
9264
- rb_define_module_function(mLibmemcached, "memcached_get", _wrap_memcached_get, -1);
9265
- rb_define_module_function(mLibmemcached, "memcached_mget", _wrap_memcached_mget, -1);
9266
- rb_define_module_function(mLibmemcached, "memcached_fetch", _wrap_memcached_fetch, -1);
9267
- rb_define_module_function(mLibmemcached, "memcached_fetch_result", _wrap_memcached_fetch_result, -1);
9268
- rb_define_module_function(mLibmemcached, "memcached_server_add_udp", _wrap_memcached_server_add_udp, -1);
9269
- rb_define_module_function(mLibmemcached, "memcached_server_add_unix_socket", _wrap_memcached_server_add_unix_socket, -1);
9270
- rb_define_module_function(mLibmemcached, "memcached_server_add", _wrap_memcached_server_add, -1);
9271
- rb_define_module_function(mLibmemcached, "memcached_server_list_free", _wrap_memcached_server_list_free, -1);
9272
- rb_define_module_function(mLibmemcached, "memcached_server_push", _wrap_memcached_server_push, -1);
9273
- rb_define_module_function(mLibmemcached, "memcached_server_list_append", _wrap_memcached_server_list_append, -1);
9274
- rb_define_module_function(mLibmemcached, "memcached_server_list_count", _wrap_memcached_server_list_count, -1);
9275
- rb_define_module_function(mLibmemcached, "memcached_servers_parse", _wrap_memcached_servers_parse, -1);
9276
- rb_define_module_function(mLibmemcached, "memcached_stat_get_value", _wrap_memcached_stat_get_value, -1);
9277
- rb_define_module_function(mLibmemcached, "memcached_stat_get_keys", _wrap_memcached_stat_get_keys, -1);
9278
- rb_define_module_function(mLibmemcached, "memcached_get_by_key", _wrap_memcached_get_by_key, -1);
9279
- rb_define_module_function(mLibmemcached, "memcached_mget_by_key", _wrap_memcached_mget_by_key, -1);
9280
- rb_define_module_function(mLibmemcached, "memcached_set_by_key", _wrap_memcached_set_by_key, -1);
9281
- rb_define_module_function(mLibmemcached, "memcached_add_by_key", _wrap_memcached_add_by_key, -1);
9282
- rb_define_module_function(mLibmemcached, "memcached_replace_by_key", _wrap_memcached_replace_by_key, -1);
9283
- rb_define_module_function(mLibmemcached, "memcached_prepend_by_key", _wrap_memcached_prepend_by_key, -1);
9284
- rb_define_module_function(mLibmemcached, "memcached_append_by_key", _wrap_memcached_append_by_key, -1);
9285
- rb_define_module_function(mLibmemcached, "memcached_cas_by_key", _wrap_memcached_cas_by_key, -1);
9286
- rb_define_module_function(mLibmemcached, "memcached_delete_by_key", _wrap_memcached_delete_by_key, -1);
9287
- rb_define_module_function(mLibmemcached, "memcached_mdelete", _wrap_memcached_mdelete, -1);
9288
- rb_define_module_function(mLibmemcached, "memcached_mdelete_by_key", _wrap_memcached_mdelete_by_key, -1);
9289
- rb_define_module_function(mLibmemcached, "memcached_fetch_execute", _wrap_memcached_fetch_execute, -1);
9290
- rb_define_module_function(mLibmemcached, "memcached_result_free", _wrap_memcached_result_free, -1);
9291
- rb_define_module_function(mLibmemcached, "memcached_result_create", _wrap_memcached_result_create, -1);
9292
- rb_define_module_function(mLibmemcached, "memcached_result_value", _wrap_memcached_result_value, -1);
9293
- rb_define_module_function(mLibmemcached, "memcached_result_length", _wrap_memcached_result_length, -1);
9294
- rb_define_module_function(mLibmemcached, "memcached_get_ruby_string", _wrap_memcached_get_ruby_string, -1);
9295
- rb_define_module_function(mLibmemcached, "memcached_select_server_at", _wrap_memcached_select_server_at, -1);
9296
- rb_define_module_function(mLibmemcached, "memcached_select_stat_at", _wrap_memcached_select_stat_at, -1);
9297
- rb_define_module_function(mLibmemcached, "memcached_repair_server_st", _wrap_memcached_repair_server_st, -1);
9546
+ rb_define_module_function(mRlibmemcached, "memcached_lib_version", _wrap_memcached_lib_version, -1);
9547
+ rb_define_module_function(mRlibmemcached, "memcached_create", _wrap_memcached_create, -1);
9548
+ rb_define_module_function(mRlibmemcached, "memcached_free", _wrap_memcached_free, -1);
9549
+ rb_define_module_function(mRlibmemcached, "memcached_clone", _wrap_memcached_clone, -1);
9550
+ rb_define_module_function(mRlibmemcached, "memcached_delete", _wrap_memcached_delete, -1);
9551
+ rb_define_module_function(mRlibmemcached, "memcached_increment", _wrap_memcached_increment, -1);
9552
+ rb_define_module_function(mRlibmemcached, "memcached_decrement", _wrap_memcached_decrement, -1);
9553
+ rb_define_module_function(mRlibmemcached, "memcached_stat_free", _wrap_memcached_stat_free, -1);
9554
+ rb_define_module_function(mRlibmemcached, "memcached_stat", _wrap_memcached_stat, -1);
9555
+ rb_define_module_function(mRlibmemcached, "memcached_stat_servername", _wrap_memcached_stat_servername, -1);
9556
+ rb_define_module_function(mRlibmemcached, "memcached_flush", _wrap_memcached_flush, -1);
9557
+ rb_define_module_function(mRlibmemcached, "memcached_verbosity", _wrap_memcached_verbosity, -1);
9558
+ rb_define_module_function(mRlibmemcached, "memcached_quit", _wrap_memcached_quit, -1);
9559
+ rb_define_module_function(mRlibmemcached, "memcached_strerror", _wrap_memcached_strerror, -1);
9560
+ rb_define_module_function(mRlibmemcached, "memcached_behavior_set", _wrap_memcached_behavior_set, -1);
9561
+ rb_define_module_function(mRlibmemcached, "memcached_behavior_get", _wrap_memcached_behavior_get, -1);
9562
+ rb_define_module_function(mRlibmemcached, "memcached_set", _wrap_memcached_set, -1);
9563
+ rb_define_module_function(mRlibmemcached, "memcached_add", _wrap_memcached_add, -1);
9564
+ rb_define_module_function(mRlibmemcached, "memcached_replace", _wrap_memcached_replace, -1);
9565
+ rb_define_module_function(mRlibmemcached, "memcached_append", _wrap_memcached_append, -1);
9566
+ rb_define_module_function(mRlibmemcached, "memcached_prepend", _wrap_memcached_prepend, -1);
9567
+ rb_define_module_function(mRlibmemcached, "memcached_cas", _wrap_memcached_cas, -1);
9568
+ rb_define_module_function(mRlibmemcached, "memcached_get", _wrap_memcached_get, -1);
9569
+ rb_define_module_function(mRlibmemcached, "memcached_mget", _wrap_memcached_mget, -1);
9570
+ rb_define_module_function(mRlibmemcached, "memcached_fetch", _wrap_memcached_fetch, -1);
9571
+ rb_define_module_function(mRlibmemcached, "memcached_fetch_result", _wrap_memcached_fetch_result, -1);
9572
+ rb_define_module_function(mRlibmemcached, "memcached_server_add_udp", _wrap_memcached_server_add_udp, -1);
9573
+ rb_define_module_function(mRlibmemcached, "memcached_server_add_unix_socket", _wrap_memcached_server_add_unix_socket, -1);
9574
+ rb_define_module_function(mRlibmemcached, "memcached_server_add", _wrap_memcached_server_add, -1);
9575
+ rb_define_module_function(mRlibmemcached, "memcached_server_list_free", _wrap_memcached_server_list_free, -1);
9576
+ rb_define_module_function(mRlibmemcached, "memcached_server_push", _wrap_memcached_server_push, -1);
9577
+ rb_define_module_function(mRlibmemcached, "memcached_server_list_append", _wrap_memcached_server_list_append, -1);
9578
+ rb_define_module_function(mRlibmemcached, "memcached_server_list_count", _wrap_memcached_server_list_count, -1);
9579
+ rb_define_module_function(mRlibmemcached, "memcached_servers_parse", _wrap_memcached_servers_parse, -1);
9580
+ rb_define_module_function(mRlibmemcached, "memcached_stat_get_value", _wrap_memcached_stat_get_value, -1);
9581
+ rb_define_module_function(mRlibmemcached, "memcached_stat_get_keys", _wrap_memcached_stat_get_keys, -1);
9582
+ rb_define_module_function(mRlibmemcached, "memcached_get_by_key", _wrap_memcached_get_by_key, -1);
9583
+ rb_define_module_function(mRlibmemcached, "memcached_mget_by_key", _wrap_memcached_mget_by_key, -1);
9584
+ rb_define_module_function(mRlibmemcached, "memcached_set_by_key", _wrap_memcached_set_by_key, -1);
9585
+ rb_define_module_function(mRlibmemcached, "memcached_add_by_key", _wrap_memcached_add_by_key, -1);
9586
+ rb_define_module_function(mRlibmemcached, "memcached_replace_by_key", _wrap_memcached_replace_by_key, -1);
9587
+ rb_define_module_function(mRlibmemcached, "memcached_prepend_by_key", _wrap_memcached_prepend_by_key, -1);
9588
+ rb_define_module_function(mRlibmemcached, "memcached_append_by_key", _wrap_memcached_append_by_key, -1);
9589
+ rb_define_module_function(mRlibmemcached, "memcached_cas_by_key", _wrap_memcached_cas_by_key, -1);
9590
+ rb_define_module_function(mRlibmemcached, "memcached_delete_by_key", _wrap_memcached_delete_by_key, -1);
9591
+ rb_define_module_function(mRlibmemcached, "memcached_fetch_execute", _wrap_memcached_fetch_execute, -1);
9592
+ rb_define_module_function(mRlibmemcached, "memcached_callback_set", _wrap_memcached_callback_set, -1);
9593
+ rb_define_module_function(mRlibmemcached, "memcached_callback_get", _wrap_memcached_callback_get, -1);
9594
+ rb_define_module_function(mRlibmemcached, "memcached_result_free", _wrap_memcached_result_free, -1);
9595
+ rb_define_module_function(mRlibmemcached, "memcached_result_create", _wrap_memcached_result_create, -1);
9596
+ rb_define_module_function(mRlibmemcached, "memcached_result_value", _wrap_memcached_result_value, -1);
9597
+ rb_define_module_function(mRlibmemcached, "memcached_result_length", _wrap_memcached_result_length, -1);
9598
+ rb_define_module_function(mRlibmemcached, "memcached_get_rvalue", _wrap_memcached_get_rvalue, -1);
9599
+ rb_define_module_function(mRlibmemcached, "memcached_fetch_rvalue", _wrap_memcached_fetch_rvalue, -1);
9600
+ rb_define_module_function(mRlibmemcached, "memcached_stat_get_rvalue", _wrap_memcached_stat_get_rvalue, -1);
9601
+ rb_define_module_function(mRlibmemcached, "memcached_select_server_at", _wrap_memcached_select_server_at, -1);
9602
+ rb_define_module_function(mRlibmemcached, "memcached_select_stat_at", _wrap_memcached_select_stat_at, -1);
9298
9603
  }
9299
9604