Sha256: 148db2729e257ce2f7ed549675c12afdef7280ba0858fb9e64838cbc7dccdcc6
Contents?: true
Size: 1.19 KB
Versions: 3
Compression:
Stored size: 1.19 KB
Contents
require "ffi" module SassC module Native extend FFI::Library ffi_lib 'ext/libsass/lib/libsass.so' require_relative "native/sass_value" typedef :pointer, :sass_options_ptr typedef :pointer, :sass_context_ptr typedef :pointer, :sass_file_context_ptr typedef :pointer, :sass_data_context_ptr typedef :pointer, :sass_c_function_list_ptr typedef :pointer, :sass_c_function_callback_ptr typedef :pointer, :sass_value_ptr callback :sass_c_function, [:pointer, :pointer], :pointer require_relative "native/sass_input_style" require_relative "native/sass_output_style" require_relative "native/string_list" # Remove the redundant "sass_" from the beginning of every method name def self.attach_function(*args) super if args.size != 3 if args[0] =~ /^sass_/ args.unshift args[0].to_s.sub(/^sass_/, "") end super(*args) end # https://github.com/ffi/ffi/wiki/Examples#array-of-strings def self.return_string_array(ptr) ptr.read_pointer.null? ? [] : ptr.get_array_of_string(0).compact end require_relative "native/native_context_api" require_relative "native/native_functions_api" end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sassc-0.0.4 | lib/sassc/native.rb |
sassc-0.0.2 | lib/sassc/native.rb |
sassc-0.0.1 | lib/sassc/native.rb |