RubyInline 3.11.4 → 3.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data.tar.gz.sig +0 -0
  2. data/History.txt +10 -0
  3. data/lib/inline.rb +11 -4
  4. metadata +8 -8
  5. metadata.gz.sig +0 -0
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,13 @@
1
+ === 3.12.0 / 2012-12-18
2
+
3
+ * 1 major enhancement:
4
+
5
+ * map_ruby_const prefixes c-vars with 'c' (eg Name -> cName).
6
+
7
+ * 1 minor enhancement:
8
+
9
+ * Added #add_id to make interning symbols in C clean and easy
10
+
1
11
  === 3.11.4 / 2012-11-23
2
12
 
3
13
  * 1 minor enhancement:
@@ -65,7 +65,7 @@ class CompilationError < RuntimeError; end
65
65
  # the current namespace.
66
66
 
67
67
  module Inline
68
- VERSION = '3.11.4'
68
+ VERSION = '3.12.0'
69
69
 
70
70
  WINDOZE = /mswin|mingw/ =~ RUBY_PLATFORM
71
71
  RUBINIUS = defined? RUBY_ENGINE
@@ -661,6 +661,13 @@ VALUE #{method}_equals(VALUE value) {
661
661
  @flags.push(*flags)
662
662
  end
663
663
 
664
+ ##
665
+ # Registers a static id_name for the symbol :name.
666
+
667
+ def add_id name
668
+ self.add_static "id_#{name}", "rb_intern(\"#{name}\")"
669
+ end
670
+
664
671
  ##
665
672
  # Adds linker flags to the link command line. No preprocessing is
666
673
  # done, so you must have all your dashes and everything.
@@ -710,12 +717,12 @@ VALUE #{method}_equals(VALUE value) {
710
717
  end
711
718
 
712
719
  ##
713
- # Maps a ruby constant to C (with the same name)
720
+ # Maps RubyConstants to cRubyConstants.
714
721
 
715
722
  def map_ruby_const(*names)
716
723
  names.each do |name|
717
- self.prefix "static VALUE #{name};"
718
- self.add_to_init " #{name} = rb_const_get(c, rb_intern(#{name.to_s.inspect}));"
724
+ self.prefix "static VALUE c#{name};"
725
+ self.add_to_init " c#{name} = rb_const_get(c, rb_intern(#{name.to_s.inspect}));"
719
726
  end
720
727
  end
721
728
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: RubyInline
3
3
  version: !ruby/object:Gem::Version
4
- hash: 35
4
+ hash: 55
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
- - 11
9
- - 4
10
- version: 3.11.4
8
+ - 12
9
+ - 0
10
+ version: 3.12.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Davis
@@ -36,7 +36,7 @@ cert_chain:
36
36
  FBHgymkyj/AOSqKRIpXPhjC6
37
37
  -----END CERTIFICATE-----
38
38
 
39
- date: 2012-11-23 00:00:00 Z
39
+ date: 2012-12-18 00:00:00 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: ZenTest
@@ -91,11 +91,11 @@ dependencies:
91
91
  requirements:
92
92
  - - ~>
93
93
  - !ruby/object:Gem::Version
94
- hash: 1
94
+ hash: 15
95
95
  segments:
96
96
  - 3
97
- - 3
98
- version: "3.3"
97
+ - 4
98
+ version: "3.4"
99
99
  type: :development
100
100
  version_requirements: *id004
101
101
  description: |-
metadata.gz.sig CHANGED
Binary file