FFI.reset -> FFI.sysdef!

This commit is contained in:
0x1eef 2024-03-08 01:19:05 -03:00
parent 0ae6e01221
commit d9042ce213
4 changed files with 5 additions and 5 deletions

View file

@ -36,10 +36,10 @@ ffi_available_features(VALUE self)
/** /**
* BSD::Control::FFI.reset! * BSD::Control::FFI.sysdef!
**/ **/
VALUE VALUE
ffi_reset(VALUE self, VALUE rb_feature, VALUE rb_path) ffi_sysdef(VALUE self, VALUE rb_feature, VALUE rb_path)
{ {
VALUE rb_enable_flag, rb_disable_flag; VALUE rb_enable_flag, rb_disable_flag;
char *enable_flag, *disable_flag, *path; char *enable_flag, *disable_flag, *path;

View file

@ -14,7 +14,7 @@ Init_hbsdctl(void)
rb_define_const(rb_mControl, "Enable", INT2NUM(1)); rb_define_const(rb_mControl, "Enable", INT2NUM(1));
rb_define_singleton_method(rb_mFFI, "available_features", ffi_available_features, 0); rb_define_singleton_method(rb_mFFI, "available_features", ffi_available_features, 0);
rb_define_singleton_method(rb_mFFI, "library_version", ffi_library_version, 0); rb_define_singleton_method(rb_mFFI, "library_version", ffi_library_version, 0);
rb_define_singleton_method(rb_mFFI, "reset!", ffi_reset, 2); rb_define_singleton_method(rb_mFFI, "sysdef!", ffi_sysdef, 2);
rb_define_singleton_method(rb_mFFI, "status", ffi_status, 2); rb_define_singleton_method(rb_mFFI, "status", ffi_status, 2);
rb_define_private_method(rb_cFeature, "set!", feature_set, 2); rb_define_private_method(rb_cFeature, "set!", feature_set, 2);
} }

View file

@ -2,4 +2,4 @@
VALUE ffi_library_version(VALUE); VALUE ffi_library_version(VALUE);
VALUE ffi_available_features(VALUE); VALUE ffi_available_features(VALUE);
VALUE ffi_status(VALUE, VALUE, VALUE); VALUE ffi_status(VALUE, VALUE, VALUE);
VALUE ffi_reset(VALUE, VALUE, VALUE); VALUE ffi_sysdef(VALUE, VALUE, VALUE);

View file

@ -52,7 +52,7 @@ module BSD::Control
# @return [Boolean] # @return [Boolean]
# Returns true on success. # Returns true on success.
def sysdef!(path) def sysdef!(path)
FFI.reset!(self, path) FFI.sysdef!(self, path)
end end
## ##