openbase 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/ext/openbase.c +12 -9
- data/lib/ruby-openbase/version.rb +1 -1
- data/website/index.html +1 -1
- metadata +2 -2
data/History.txt
CHANGED
data/ext/openbase.c
CHANGED
@@ -449,7 +449,7 @@ static void result_free( OpenBaseResult *result )
|
|
449
449
|
{
|
450
450
|
int i;
|
451
451
|
for (i = 0; i < result->col_count; i++) {
|
452
|
-
free(result->buf[i]);
|
452
|
+
if (result->buf[i] != NULL) free(result->buf[i]);
|
453
453
|
}
|
454
454
|
free(result->types);
|
455
455
|
free(result->buf);
|
@@ -458,6 +458,8 @@ static void result_free( OpenBaseResult *result )
|
|
458
458
|
free(result);
|
459
459
|
}
|
460
460
|
|
461
|
+
#define STR2_OR_QNIL(ptr) (ptr == NULL ? Qnil : rb_str_new2(ptr))
|
462
|
+
|
461
463
|
static VALUE result_new( VALUE self, VALUE ob )
|
462
464
|
{
|
463
465
|
OpenBasePtr openbase;
|
@@ -561,12 +563,13 @@ static VALUE result_new( VALUE self, VALUE ob )
|
|
561
563
|
result->buf[i] = ALLOC_N(char, OB_TIMESTAMP_LENGTH);
|
562
564
|
ob_bindString(openbase,(char *)result->buf[i]);
|
563
565
|
break;
|
564
|
-
default:
|
565
|
-
|
566
|
+
default:
|
567
|
+
result->buf[i] = ALLOC(int);
|
568
|
+
break;
|
566
569
|
}
|
567
|
-
rb_ary_push(col_names,
|
568
|
-
info = columninfo_new(rb_cOpenBaseColumnInfo,
|
569
|
-
|
570
|
+
rb_ary_push(col_names,STR2_OR_QNIL(ob_resultColumnName(openbase,i)));
|
571
|
+
info = columninfo_new(rb_cOpenBaseColumnInfo, STR2_OR_QNIL(ob_resultColumnName(openbase,i)), \
|
572
|
+
STR2_OR_QNIL(type), STR2_OR_QNIL(ob_resultTableName(openbase,i)));
|
570
573
|
rb_ary_push(infos, info);
|
571
574
|
}
|
572
575
|
|
@@ -879,9 +882,9 @@ static VALUE columninfo_new( VALUE self, VALUE name, VALUE type, VALUE table )
|
|
879
882
|
OpenBaseColumnInfo *info;
|
880
883
|
info = ALLOC(OpenBaseColumnInfo);
|
881
884
|
|
882
|
-
Check_Type(name, T_STRING);
|
883
|
-
Check_Type(type, T_STRING);
|
884
|
-
Check_Type(table, T_STRING);
|
885
|
+
if (name != Qnil) {Check_Type(name, T_STRING);}
|
886
|
+
if (type != Qnil) {Check_Type(type, T_STRING);}
|
887
|
+
if (table != Qnil) {Check_Type(table, T_STRING);}
|
885
888
|
info->name = name;
|
886
889
|
info->type = type;
|
887
890
|
info->table = table;
|
data/website/index.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>Ruby/OpenBase</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/ruby-openbase"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/ruby-openbase" class="numbers">0.8.
|
36
|
+
<a href="http://rubyforge.org/projects/ruby-openbase" class="numbers">0.8.3</a>
|
37
37
|
</div>
|
38
38
|
<h2>What</h2>
|
39
39
|
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: openbase
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.8.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.8.3
|
7
|
+
date: 2007-09-09 00:00:00 -04:00
|
8
8
|
summary: Provides access to OpenBase databases from Ruby.
|
9
9
|
require_paths:
|
10
10
|
- lib
|