module SassC::Native

def self.attach_function(*args)

Remove the redundant "sass_" from the beginning of every method name
def self.attach_function(*args)
  return super if args.size != 3
  if args[0] =~ /^sass_/
    args.unshift args[0].to_s.sub(/^sass_/, "")
  end
  super(*args)
end

def self.context_get_included_files(*args)

def self.context_get_included_files(*args)
  return_string_array _context_get_included_files(*args)
end

def self.make_data_context(data)

def self.make_data_context(data)
  _make_data_context(Native.native_string(data))
end

def self.native_string(string)

def self.native_string(string)
  m = FFI::MemoryPointer.from_string(string)
  m.autorelease = false
  m
end

def self.return_string_array(ptr)

https://github.com/ffi/ffi/wiki/Examples#array-of-strings
def self.return_string_array(ptr)
  ptr.null? ? [] : ptr.get_array_of_string(0).compact
end

def self.string_get_type(native_value)

def self.string_get_type(native_value)
  string_is_quoted(native_value) ? :string : :identifier
end