summaryrefslogtreecommitdiff
path: root/ext/digest
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-11-18 16:36:47 +0900
committergit <[email protected]>2024-11-18 07:43:33 +0000
commit0f75ac83800b7149364ae559fbd1cb93a81a82ca ()
treef87fe53c0e0cb20702441ed0b80a4cda6cdec567 /ext/digest
parent7407aa51eaaac99bdedda3ddfcf71a37a8feaa50 (diff)
[ruby/digest] Adjust styles [ci skip]
- Use the C90 standard style for comments, since this gem supports versions prior to ruby 2.7. - Adjust the indentation. https://.com/ruby/digest/commit/4751402e50
-rw-r--r--ext/digest/digest.h19
1 files changed, 10 insertions, 9 deletions
@@ -77,16 +77,16 @@ static inline VALUE
rb_digest_make_metadata(const rb_digest_metadata_t *meta)
{
#if EXTSTATIC
- // The extension is built as a static library, so safe to refer to
- // rb_digest_wrap_metadata directly.
- extern VALUE rb_digest_wrap_metadata(const rb_digest_metadata_t *meta);
- return rb_digest_wrap_metadata(meta);
#else
- // The extension is built as a shared library, so we can't refer to
- // rb_digest_wrap_metadata directly.
# ifdef DIGEST_USE_RB_EXT_RESOLVE_SYMBOL
- // If rb_ext_resolve_symbol() is available, use it to get the address of
- // rb_digest_wrap_metadata.
typedef VALUE (*wrapper_func_type)(const rb_digest_metadata_t *meta);
static wrapper_func_type wrapper;
if (!wrapper) {
@@ -96,7 +96,8 @@ rb_digest_make_metadata(const rb_digest_metadata_t *meta)
}
return wrapper(meta);
# else
- // If rb_ext_resolve_symbol() is not available, keep using untyped data.
# undef RUBY_UNTYPED_DATA_WARNING
# define RUBY_UNTYPED_DATA_WARNING 0
return rb_obj_freeze(Data_Wrap_Struct(0, 0, 0, (void *)meta));