Skip to content

rb_data_object_wrap is deprecated warning #3

@binarygit

Description

@binarygit

When runnning the rake compile task the following deprecation warning shows up in ruby 4.0.0:

compiling ../../../../ext/glamour/extension.c
../../../../ext/glamour/extension.c:182:10: warning: 'rb_data_object_wrap_warning' is deprecated: by TypedData [-Wdeprecated-declarations]
  182 |   return Data_Wrap_Struct(klass, NULL, NULL, NULL);
      |          ^
/Users/voyager/.rubies/ruby-4.0.0/include/ruby-4.0.0/ruby/internal/core/rdata.h:202:5: note: expanded from macro 'Data_Wrap_Struct'
  202 |     rb_data_object_wrap(                          \
      |     ^
/Users/voyager/.rubies/ruby-4.0.0/include/ruby-4.0.0/ruby/internal/core/rdata.h:366:31: note: expanded from macro 'rb_data_object_wrap'
  366 | #define rb_data_object_wrap   RUBY_MACRO_SELECT(rb_data_object_wrap_2, RUBY_UNTYPED_DATA_WARNING)
      |                               ^
/Users/voyager/.rubies/ruby-4.0.0/include/ruby-4.0.0/ruby/internal/core/rdata.h:50:35: note: expanded from macro 'RUBY_MACRO_SELECT'
   50 | #define RUBY_MACRO_SELECT(x, y)   RBIMPL_MACRO_SELECT(x, y)
      |                                   ^
/Users/voyager/.rubies/ruby-4.0.0/include/ruby-4.0.0/ruby/internal/core/rdata.h:49:35: note: expanded from macro 'RBIMPL_MACRO_SELECT'
   49 | #define RBIMPL_MACRO_SELECT(x, y) x ## y
      |                                   ^
<scratch space>:95:1: note: expanded from here
   95 | rb_data_object_wrap_1
      | ^
/Users/voyager/.rubies/ruby-4.0.0/include/ruby-4.0.0/ruby/internal/core/rdata.h:364:31: note: expanded from macro 'rb_data_object_wrap_1'
  364 | #define rb_data_object_wrap_1 rb_data_object_wrap_warning
      |                               ^
/Users/voyager/.rubies/ruby-4.0.0/include/ruby-4.0.0/ruby/internal/core/rdata.h:280:1: note: 'rb_data_object_wrap_warning' has been explicitly marked deprecated here
  280 | RBIMPL_ATTRSET_UNTYPED_DATA_FUNC()
      | ^
/Users/voyager/.rubies/ruby-4.0.0/include/ruby-4.0.0/ruby/internal/core/rdata.h:47:5: note: expanded from macro 'RBIMPL_ATTRSET_UNTYPED_DATA_FUNC'
   47 |     RBIMPL_ATTR_DEPRECATED(("by TypedData"))
      |     ^
/Users/voyager/.rubies/ruby-4.0.0/include/ruby-4.0.0/ruby/internal/attr/deprecated.h:36:53: note: expanded from macro 'RBIMPL_ATTR_DEPRECATED'
   36 | # define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions