rbind 0.0.13 → 0.0.14

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.
@@ -19,8 +19,6 @@ module Rbind
19
19
  name = normalize(name)
20
20
  cn = "#{cprefix}#{name.gsub("::","_")}"
21
21
  cn = cn.gsub("()","_fct")
22
- cn = cn.gsub("<=","_smaller_equal")
23
- cn = cn.gsub(">=","_greater_equal")
24
22
  cn = cn.gsub("!=","_unequal")
25
23
  cn = cn.gsub("==","_equal")
26
24
  cn = cn.gsub("&=","_and_set")
@@ -32,8 +30,6 @@ module Rbind
32
30
  cn = cn.gsub("/","_div")
33
31
  cn = cn.gsub("!","_not")
34
32
  cn = cn.gsub("&","_and")
35
- cn = cn.gsub("<","_smaller")
36
- cn = cn.gsub(">","_greater")
37
33
  cn.gsub("[]","_array")
38
34
  end
39
35
 
@@ -278,7 +278,7 @@ module Rbind
278
278
  if !!(ns = RBase.namespace(name))
279
279
  ns = ns.split("::")
280
280
  ns << RBase.basename(name)
281
- t = type(ns.shift,false)
281
+ t = type(ns.shift,false,false)
282
282
  t.type(ns.join("::"),false,false) if t
283
283
  end
284
284
  end
@@ -354,7 +354,7 @@ module Rbind
354
354
  end
355
355
 
356
356
  def method_missing(m,*args)
357
- t = type(m.to_s,false)
357
+ t = type(m.to_s,false,false)
358
358
  return t if t
359
359
 
360
360
  op = operation(m.to_s,false)
@@ -119,7 +119,16 @@ module Rbind
119
119
  flags = $3
120
120
  parent_classes = if parent_classes
121
121
  parent_classes.gsub(" ","").split(",").map do |name|
122
+ #TODO this should also call the user callback
122
123
  t = type(RBase.normalize(name),false)
124
+ # remove first namespace and try again
125
+ # this is workaround for the hdr_parser adding
126
+ # always the namespace to the parent class
127
+ t ||= begin
128
+ names = RBase.normalize(name).split("::")
129
+ names.shift
130
+ type(names.join("::"),false) if !names.empty?
131
+ end
123
132
  # auto add parent class
124
133
  t ||= add_type(RClass.new(RBase.normalize(name)))
125
134
  end
data/lib/rbind/rbind.rb CHANGED
@@ -190,7 +190,7 @@ module Rbind
190
190
  end
191
191
 
192
192
  def method_missing(m,*args)
193
- t = @parser.type(m.to_s,false)
193
+ t = @parser.type(m.to_s,false,false)
194
194
  return t if t
195
195
 
196
196
  op = @parser.operation(m.to_s,false)
data/rbind.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'rbind'
3
- s.version = '0.0.13'
4
- s.date = '2013-07-03'
3
+ s.version = '0.0.14'
4
+ s.date = '2013-09-03'
5
5
  s.platform = Gem::Platform::RUBY
6
6
  s.authors = ['Alexander Duda']
7
7
  s.email = ['Alexander.Duda@dfki.de']
metadata CHANGED
@@ -1,28 +1,28 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rbind
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.14
4
5
  prerelease:
5
- version: 0.0.13
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Alexander Duda
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2013-07-03 00:00:00 Z
12
+ date: 2013-09-03 00:00:00.000000000 Z
14
13
  dependencies: []
15
-
16
- description: Rbind is developed to automatically generate ruby bindings for OpenCV but is not tight to this library. It allows to import already wrapped types from other gems/libraries using rbind to share the same types across multiple gems/libraries. For now rbind uses a copy of the OpenCV python hdr_parser to parse c/c++ header files and looks for certain defines. This gem is still under heavy development and the API might change in the future.
17
- email:
14
+ description: Rbind is developed to automatically generate ruby bindings for OpenCV
15
+ but is not tight to this library. It allows to import already wrapped types from
16
+ other gems/libraries using rbind to share the same types across multiple gems/libraries.
17
+ For now rbind uses a copy of the OpenCV python hdr_parser to parse c/c++ header
18
+ files and looks for certain defines. This gem is still under heavy development and
19
+ the API might change in the future.
20
+ email:
18
21
  - Alexander.Duda@dfki.de
19
22
  executables: []
20
-
21
23
  extensions: []
22
-
23
24
  extra_rdoc_files: []
24
-
25
- files:
25
+ files:
26
26
  - README.md
27
27
  - lib/rbind.rb
28
28
  - lib/rbind/core.rb
@@ -79,31 +79,27 @@ files:
79
79
  - test/test_generator_ruby.rb
80
80
  homepage: http://github.com/D-Alex/rbind
81
81
  licenses: []
82
-
83
82
  post_install_message:
84
83
  rdoc_options: []
85
-
86
- require_paths:
84
+ require_paths:
87
85
  - lib
88
- required_ruby_version: !ruby/object:Gem::Requirement
86
+ required_ruby_version: !ruby/object:Gem::Requirement
89
87
  none: false
90
- requirements:
91
- - - ">="
92
- - !ruby/object:Gem::Version
93
- version: "0"
94
- required_rubygems_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ! '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
95
93
  none: false
96
- requirements:
97
- - - ">="
98
- - !ruby/object:Gem::Version
94
+ requirements:
95
+ - - ! '>='
96
+ - !ruby/object:Gem::Version
99
97
  version: 1.3.6
100
98
  requirements: []
101
-
102
99
  rubyforge_project:
103
100
  rubygems_version: 1.8.23
104
101
  signing_key:
105
102
  specification_version: 3
106
103
  summary: Library for genereating automated ffi-bindings for c/c++ libraries
107
104
  test_files: []
108
-
109
105
  has_rdoc: