diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-05-02 23:07:08 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-05-02 23:07:08 +0200 |
commit | edd4c24ff2c0a5cf62a32e742010eb47574b5abb (patch) | |
tree | fa295d7b6fdc0d658566d162b48a5b2100df456c /lib | |
parent | 15fe513c7237ce4d0ad7b34d34c922a47a4a9811 (diff) | |
download | ffi-efl-edd4c24ff2c0a5cf62a32e742010eb47574b5abb.zip ffi-efl-edd4c24ff2c0a5cf62a32e742010eb47574b5abb.tar.gz |
eina_list : remove Array#from_eina_list, cleanup REinaList#initialize update specs
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efl/eina_list.rb | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/efl/eina_list.rb b/lib/efl/eina_list.rb index 3d3ce83..3e014ad 100644 --- a/lib/efl/eina_list.rb +++ b/lib/efl/eina_list.rb @@ -3,17 +3,6 @@ # require 'efl/ffi/eina_list' # -class Array - def self.from_eina_list o - if o.is_a? Efl::EinaList::REinaList - o.to_ary - elsif o.is_a? FFI::Pointer - Efl::EinaList::REinaList.new(o).to_ary - else - raise ArgumentError.new "wrong argument #{o.class.name}" - end - end -end module Efl module EinaList # @@ -36,8 +25,6 @@ module Efl o when NilClass FFI::Pointer::NULL - when self.class - o.to_ptr when Array o.inject(FFI::Pointer::NULL) { |p,e| Efl::EinaList.eina_list_append p, e } else @@ -45,8 +32,7 @@ module Efl end ) end - def free p=nil - return Efl::EinaList.eina_list_free p unless p.nil? + def free Efl::EinaList.eina_list_free @ptr @ptr = nil end |