Feature #9502

Remove deprecated definitions

Added by Akira Tanaka 3 months ago. Updated 2 months ago.

[ruby-core:60581]
Status:Closed
Priority:Normal
Assignee:-
Category:-
Target version:-

Description

I'd like to remove deprecated definitions.
This means C level API change.

The list of functions, macros and types are follows.
(This list doesn't contain definitions deprecated after 2.1.0 release.)

VA VD NAME
old 193 CheckSafeStr -> SafeStringValue
old 193 rb
checksafestr -> SafeStringValue
old 193 rbquadpack -> rbintegerpack
old 193 rbquadunpack -> rbintegerunpack
old 193 rbreadcheck : access struct FILE internal. no replacement.
old 193 rbstructivget : internal function. no replacement.
191 * struct rb
blockingregionbuffer : internal type. no replacement.
191 193 rbthreadblockingregionbegin -> rbthreadcallwithoutgvl family
191 193 rbthreadblockingregionend -> rbthreadcallwithoutgvl family
old 193 TRAPBEG -> rbthreadcallwithoutgvl family
old 193 TRAP
END -> rbthreadcallwithoutgvl family
old 193 rbthreadselect -> rbthreadfdselect
191 * struct rb
execarg : internal type. no replacement.
191 200 rb
exec : internal function. no replacement.
191 200 rbexecargaddopt : internal function. no replacement.
191 200 rb
execargfixup : internal function. no replacement.
191 200 rbexecarginit : internal function. no replacement.
192 200 rb
execerr : internal function. no replacement.
191 200 rb
fork : internal function. no replacement.
192 200 rbforkerr : internal function. no replacement.
191 200 rbprocexecn : internal function. no replacement.
191 200 rb
runexecoptions : internal function. no replacement.
192 200 rbrunexecoptionserr : internal function. no replacement.
191 200 rbthreadblockingregion -> rbthreadcallwithoutgvl family
old 200 rb
threadpolling -> rbthreadwaitfor
186 210 rbbig2str0 : internal function. no replacement.
193 210 rb
big2ulongpack -> rbintegerpack
193 210 rb
gcsetparams : internal function. no replacement.

VA is the version that the definition is available since.
"old" means it is available since 1.8.5 at least.

VD is the version that the definition is deprecated to cause warnings.
"*" means struct type.
struct types are not a target of deprecation warning.

It seems the half of definitions have replacements.

The rest are removed without replacement because they are ruby internals.

remove-deprecates.diff Magnifier (29.5 KB) Akira Tanaka, 02/08/2014 03:11 PM

Associated revisions

Revision 44955
Added by Akira Tanaka 2 months ago

  • include/ruby/intern.h, include/ruby/io.h, include/ruby/ruby.h, include/ruby/win32.h, include/ruby/backward/rubysig.h, bignum.c, gc.c, io.c, process.c, safe.c, struct.c, thread.c, ext/socket/rubysocket.h, ext/-test-/oldthreadselect: Remove deprecated definitions [Feature #9502]

History

#1 Updated by Nobuyoshi Nakada 3 months ago

Agree.
And today I've thought about deprecation of rb_argv0 too.

#2 Updated by Akira Tanaka 3 months ago

We should provide a transition period.
So I didn't list definitions deprecated after Ruby 2.1 such as rbstrassociate.
They will be warned at Ruby 2.2 and can be removed at Ruby 2.3 or later.

rbargv0 can be same as rbstr_associate if you deprecated it now.
But it is used in ext/tk.
So you need to remove the use before the deprecation.

#3 Updated by Yukihiro Matsumoto 2 months ago

Agreed. Remove those functions (structs).

Matz.

#4 Updated by Akira Tanaka 2 months ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r44955.


  • include/ruby/intern.h, include/ruby/io.h, include/ruby/ruby.h, include/ruby/win32.h, include/ruby/backward/rubysig.h, bignum.c, gc.c, io.c, process.c, safe.c, struct.c, thread.c, ext/socket/rubysocket.h, ext/-test-/oldthreadselect: Remove deprecated definitions [Feature #9502]

#5 Updated by Koichi Sasada 2 months ago

I copied this table to the following page:
https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/CAPI_ObsoleteFunctions

Maybe we can maintain this page for deprecated definitions.

#6 Updated by Koichi Sasada 2 months ago

Koichi Sasada wrote:

I copied this table to the following page:
https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/CAPI_ObsoleteFunctions

Not only functions. So I renamed to:
https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/CAPI_obsolete_definitions

Also available in: Atom PDF