Class: GLib::IConv

Inherits:
Object
  • Object
show all
Defined in:
lib/ffi-glib/iconv.rb

Overview

Overrides for IConv

Class Method Summary collapse

Class Method Details

.open(to_codeset, from_codeset) ⇒ Object



6
7
8
9
10
11
# File 'lib/ffi-glib/iconv.rb', line 6

def self.open to_codeset, from_codeset
  to_ptr = GirFFI::InPointer.from(:utf8, to_codeset)
  from_ptr = GirFFI::InPointer.from(:utf8, from_codeset)
  result_ptr = Lib.g_iconv_open(to_ptr, from_ptr)
  wrap(result_ptr)
end