Prefer 0 over NULL as function pointers

SunC warns use of `NULL`, pointer to data as function pointers.
This commit is contained in:
Nobuyoshi Nakada 2023-06-23 03:15:55 +09:00 committed by GitHub
parent 52f8de4f21
commit b934976024
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2023-06-22 18:16:14 +00:00
Merged: https://github.com/ruby/ruby/pull/7972

Merged-By: nobu <nobu@ruby-lang.org>
5 changed files with 5 additions and 5 deletions

View file

@ -1871,7 +1871,7 @@ rb_data_with(int argc, const VALUE *argv, VALUE self)
}
VALUE h = rb_struct_to_h(self);
rb_hash_update_by(h, kwargs, NULL);
rb_hash_update_by(h, kwargs, 0);
return rb_class_new_instance_kw(1, &h, rb_obj_class(self), TRUE);
}