-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use TypedData_Wrap_Struct() macro to suppress deprecated messages (#359)
When compile ox gem with Ruby 3.4-dev, it show the following deprecated messages: ``` ../../../../ext/ox/builder.c:356:29: warning: 'rb_data_object_wrap_warning' is deprecated: by TypedData [-Wdeprecated-declarations] 356 | volatile VALUE rb = Data_Wrap_Struct(builder_class, NULL, builder_free, b); | ^ /Users/watson/.rbenv/versions/3.4-dev/include/ruby-3.4.0+0/ruby/internal/core/rdata.h:199:5: note: expanded from macro 'Data_Wrap_Struct' 199 | rb_data_object_wrap( \ | ^ /Users/watson/.rbenv/versions/3.4-dev/include/ruby-3.4.0+0/ruby/internal/core/rdata.h:363:31: note: expanded from macro 'rb_data_object_wrap' 363 | #define rb_data_object_wrap RUBY_MACRO_SELECT(rb_data_object_wrap_2, RUBY_UNTYPED_DATA_WARNING) | ^ /Users/watson/.rbenv/versions/3.4-dev/include/ruby-3.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/watson/.rbenv/versions/3.4-dev/include/ruby-3.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>:119:1: note: expanded from here 119 | rb_data_object_wrap_1 | ^ /Users/watson/.rbenv/versions/3.4-dev/include/ruby-3.4.0+0/ruby/internal/core/rdata.h:361:31: note: expanded from macro 'rb_data_object_wrap_1' 361 | #define rb_data_object_wrap_1 rb_data_object_wrap_warning | ^ /Users/watson/.rbenv/versions/3.4-dev/include/ruby-3.4.0+0/ruby/internal/core/rdata.h:277:1: note: 'rb_data_object_wrap_warning' has been explicitly marked deprecated here 277 | RBIMPL_ATTRSET_UNTYPED_DATA_FUNC() | ^ /Users/watson/.rbenv/versions/3.4-dev/include/ruby-3.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/watson/.rbenv/versions/3.4-dev/include/ruby-3.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)) | ^ ``` This patch will suppress the deprecated messages.
- Loading branch information
1 parent
1990ad2
commit 049ecbf
Showing
8 changed files
with
148 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.