ricardochimal-ruby-filemagic 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.
data/CHANGELOG CHANGED
@@ -8,3 +8,8 @@ o Initial release.
8
8
 
9
9
  o Added manual close method
10
10
  o Added unit test suite
11
+
12
+ --------------------------------------------------------------------------------
13
+ 9/14/2009 version 0.1.2
14
+
15
+ o Ruby 1.9 compatibility (by http://github.com/red-agent)
data/filemagic.c CHANGED
@@ -16,6 +16,10 @@
16
16
  #include "ruby.h"
17
17
  #include <magic.h>
18
18
 
19
+ #ifndef RSTRING_LEN
20
+ #define RSTRING_LEN(str) RSTRING(str)->len
21
+ #endif
22
+
19
23
  static VALUE cFileMagic, rb_FileMagicError;
20
24
 
21
25
  #define GetMagicCookie(obj, cookie) {\
@@ -83,7 +87,7 @@ static VALUE magick_file(VALUE class, VALUE file)
83
87
  /* Return a string describing the string buffer */
84
88
  static VALUE magick_buffer(VALUE class, VALUE buffer)
85
89
  {
86
- int i = RSTRING(buffer)->len;
90
+ int i = RSTRING_LEN(buffer);
87
91
  const char *m;
88
92
  magic_t cookie;
89
93
  m = STR2CSTR(buffer);
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
4
4
  s.platform = "ruby"
5
5
  s.description = "Ruby FileMagic Library Bindings"
6
6
  s.summary = "Ruby FileMagic Library Bindings"
7
- s.version = "0.1.1"
7
+ s.version = "0.1.2"
8
8
  s.has_rdoc = "false"
9
9
  s.name = "ruby-filemagic"
10
10
  s.authors = ["Travis Whitton", "Ricardo Chimal, Jr."]
data/test/pylink CHANGED
@@ -1 +1 @@
1
- pyfile
1
+ """
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ricardochimal-ruby-filemagic
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
  - Travis Whitton
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2008-06-25 00:00:00 -07:00
13
+ date: 2009-05-16 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies: []
16
16