* Use full function names in c library

* Set aliases in Ruby code
pull/7/head
Anton Smirnov 4 years ago
parent e61ccc61ba
commit 790c98004c

@ -67,9 +67,9 @@ static void jdl_init_constants()
static void jdl_init_methods()
{
rb_define_singleton_method(mNative, "print", jdl_native_print, 2);
rb_define_singleton_method(mNative, "send", jdl_native_send, -1); /* -1 to pass as C array */
rb_define_singleton_method(mNative, "perror", jdl_native_perror, 1);
rb_define_singleton_method(mNative, "sd_journal_print", jdl_native_print, 2);
rb_define_singleton_method(mNative, "sd_journal_send", jdl_native_send, -1); /* -1 to pass as C array */
rb_define_singleton_method(mNative, "sd_journal_perror", jdl_native_perror, 1);
// dummy detection method
rb_define_singleton_method(mNative, "dummy?", jdl_native_is_dummy, 0);

@ -22,5 +22,10 @@ require 'journald_native'
module Journald
module Native
class << self
alias_method :print, :sd_journal_print
alias_method :send, :sd_journal_send
alias_method :perror, :sd_journal_perror
end
end
end

Loading…
Cancel
Save