xspond-xapian-ruby 0.1.1 → 0.1.2

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.
Files changed (3) hide show
  1. data/ext/extconf.rb +1 -1
  2. data/ext/xapian_wrap.cc +14 -11
  3. metadata +4 -3
data/ext/extconf.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
 
3
- XAPIAN_RUBY_VERSION = '0.1.1'
3
+ XAPIAN_RUBY_VERSION = '0.1.2'
4
4
 
5
5
  # Shamelessly borrowed from the RMagick project
6
6
  # Thanks!
data/ext/xapian_wrap.cc CHANGED
@@ -824,6 +824,8 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
824
824
 
825
825
 
826
826
  #include <ruby.h>
827
+ #undef rb_intern
828
+
827
829
 
828
830
  /* Remove global macros defined in Ruby's win32.h */
829
831
  #ifdef write
@@ -2838,7 +2840,7 @@ SWIG_ruby_failed(void)
2838
2840
  }
2839
2841
 
2840
2842
 
2841
- /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.0.10/xapian/swig/Lib/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
2843
+ /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.0.16/xapian/swig/Lib/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
2842
2844
  SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
2843
2845
  {
2844
2846
  VALUE obj = args[0];
@@ -2884,7 +2886,7 @@ SWIG_From_bool (bool value)
2884
2886
  }
2885
2887
 
2886
2888
 
2887
- /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.0.10/xapian/swig/Lib/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
2889
+ /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.0.16/xapian/swig/Lib/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
2888
2890
  SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
2889
2891
  {
2890
2892
  VALUE obj = args[0];
@@ -2987,7 +2989,7 @@ struct timeval rb_time_timeval(VALUE);
2987
2989
  * Based on the php4 and python util.i files.
2988
2990
  *
2989
2991
  * Copyright (C) 2006 Networked Knowledge Systems, Inc.
2990
- * Copyright (C) 2006,2007 Olly Betts
2992
+ * Copyright (C) 2006,2007,2009 Olly Betts
2991
2993
  *
2992
2994
  * This program is free software; you can redistribute it and/or
2993
2995
  * modify it under the terms of the GNU General Public License as
@@ -3232,13 +3234,13 @@ SWIGINTERN bool Xapian_ValueIterator_equals(Xapian::ValueIterator const *self,Xa
3232
3234
  return (*self) == other;
3233
3235
  }
3234
3236
 
3235
- /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.0.10/xapian/swig/Lib/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
3237
+ /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.0.16/xapian/swig/Lib/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
3236
3238
  SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
3237
3239
  {
3238
3240
  VALUE obj = args[0];
3239
3241
  VALUE type = TYPE(obj);
3240
3242
  double *res = (double *)(args[1]);
3241
- *res = (type == T_FLOAT ? NUM2DBL(obj) : (type == T_FIXNUM ? (double) FIX2INT(obj) : rb_big2dbl(obj)));
3243
+ *res = NUM2DBL(obj);
3242
3244
  return obj;
3243
3245
  }
3244
3246
  /*@SWIG@*/
@@ -20150,13 +20152,13 @@ _wrap_new_Query__SWIG_8(int argc, VALUE *argv, VALUE self) {
20150
20152
  SWIG_exception(SWIG_ValueError, "expected array of queries");
20151
20153
  }
20152
20154
 
20153
- int numitems = RARRAY(argv[1])->len;
20155
+ int numitems = RARRAY_LEN(argv[1]);
20154
20156
  v2.reserve(numitems);
20155
20157
  for (int i = 0; i < numitems; ++i) {
20156
20158
  VALUE arrayEntry = rb_ary_entry(argv[1], i);
20157
20159
  if (TYPE(arrayEntry) == T_STRING) {
20158
- v2.push_back(Xapian::Query(string(RSTRING(arrayEntry)->ptr,
20159
- RSTRING(arrayEntry)->len)));
20160
+ v2.push_back(Xapian::Query(string(RSTRING_PTR(arrayEntry),
20161
+ RSTRING_LEN(arrayEntry))));
20160
20162
  }
20161
20163
  else {
20162
20164
  // array element may be a Xapian::Query object. Add it if it is,
@@ -20220,13 +20222,13 @@ _wrap_new_Query__SWIG_9(int argc, VALUE *argv, VALUE self) {
20220
20222
  SWIG_exception(SWIG_ValueError, "expected array of queries");
20221
20223
  }
20222
20224
 
20223
- int numitems = RARRAY(argv[1])->len;
20225
+ int numitems = RARRAY_LEN(argv[1]);
20224
20226
  v2.reserve(numitems);
20225
20227
  for (int i = 0; i < numitems; ++i) {
20226
20228
  VALUE arrayEntry = rb_ary_entry(argv[1], i);
20227
20229
  if (TYPE(arrayEntry) == T_STRING) {
20228
- v2.push_back(Xapian::Query(string(RSTRING(arrayEntry)->ptr,
20229
- RSTRING(arrayEntry)->len)));
20230
+ v2.push_back(Xapian::Query(string(RSTRING_PTR(arrayEntry),
20231
+ RSTRING_LEN(arrayEntry))));
20230
20232
  }
20231
20233
  else {
20232
20234
  // array element may be a Xapian::Query object. Add it if it is,
@@ -25709,6 +25711,7 @@ SWIGEXPORT void Init__xapian(void) {
25709
25711
  rb_define_const(cQueryParser.klass, "FLAG_SYNONYM", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_SYNONYM)));
25710
25712
  rb_define_const(cQueryParser.klass, "FLAG_AUTO_SYNONYMS", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_AUTO_SYNONYMS)));
25711
25713
  rb_define_const(cQueryParser.klass, "FLAG_AUTO_MULTIWORD_SYNONYMS", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_AUTO_MULTIWORD_SYNONYMS)));
25714
+ rb_define_const(cQueryParser.klass, "FLAG_DEFAULT", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_DEFAULT)));
25712
25715
  rb_define_const(cQueryParser.klass, "STEM_NONE", SWIG_From_int(static_cast< int >(Xapian::QueryParser::STEM_NONE)));
25713
25716
  rb_define_const(cQueryParser.klass, "STEM_SOME", SWIG_From_int(static_cast< int >(Xapian::QueryParser::STEM_SOME)));
25714
25717
  rb_define_const(cQueryParser.klass, "STEM_ALL", SWIG_From_int(static_cast< int >(Xapian::QueryParser::STEM_ALL)));
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xspond-xapian-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Weidendorf
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-03-11 00:00:00 -07:00
13
+ date: 2009-09-21 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies: []
16
16
 
@@ -32,6 +32,7 @@ files:
32
32
  - tests/smoketest.rb
33
33
  has_rdoc: true
34
34
  homepage: http://github.com/xspond/xapian-ruby
35
+ licenses:
35
36
  post_install_message:
36
37
  rdoc_options:
37
38
  - --charset=UTF-8
@@ -53,7 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
54
  requirements: []
54
55
 
55
56
  rubyforge_project:
56
- rubygems_version: 1.2.0
57
+ rubygems_version: 1.3.5
57
58
  signing_key:
58
59
  specification_version: 2
59
60
  summary: Ruby bindings for xapian