mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Prefer 0
over NULL
as function pointers
SunC warns use of `NULL`, pointer to data as function pointers.
This commit is contained in:
parent
52f8de4f21
commit
b934976024
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
2
struct.c
2
struct.c
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue