https://gcc.gnu.org/gcc-10/changes.html#c
> * GCC now defaults to `-fno-common`. As a result, global
> variable accesses are more efficient on various targets. In
> C, global variables with multiple tentative definitions now
> result in linker errors. With `-fcommon` such definitions are
> silently merged during linking.
This removes the security features added by $SAFE = 1, and warns for access
or modification of $SAFE from Ruby-level, as well as warning when calling
all public C functions related to $SAFE.
This modifies some internal functions that took a safe level argument
to no longer take the argument.
rb_require_safe now warns, rb_require_string has been added as a
version that takes a VALUE and does not warn.
One public C function that still takes a safe level argument and that
this doesn't warn for is rb_eval_cmd. We may want to consider
adding an alternative method that does not take a safe level argument,
and warn for rb_eval_cmd.
* ext/win32ole/win32ole_error.h: ditto.
* ext/win32ole/win32ole.c(typeinfo_from_ole): raise WIN32OLEQueryInterfaceError in ole_methods.
* ext/win32ole/win32ole_method.c(ole_methods_from_typeinfo): ditto.
M ext/win32ole/win32ole.c
M ext/win32ole/win32ole_error.c
M ext/win32ole/win32ole_error.h
M ext/win32ole/win32ole_method.c
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/win32ole/win32ole.c (g_ole_initialized): compare with 0
instead of cast to get rid of pointer-to-int-cast warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/win32ole/win32ole.c (ole_val2variant): reuse the converted
result for V_I8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/win32ole/win32ole.c (ole_val2variant): get rid of repeated
conversions and fix a compile error due to V_I8 in old VC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* *.c: rename rb_funcall2 to rb_funcallv, except for extensions
which are/will be/may be gems. [Fix GH-1406]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/win32ole/win32ole.c (fole_missing): make substring or dup to
share the content if possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/win32ole/win32ole.c (fole_missing): remove dead code
meaningless since r51913. RSTRING_LEN does not exceed LONG_MAX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/win32ole/win32ole.c (ole_vstr2wc): check argument type, vstr
must be a String here. reported by Marcin 'Icewall' Noga of
Cisco Talos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/win32ole/win32ole.c (fole_missing): fix symbol condition,
rb_check_symbol returns Qnil when the symbol is not interned.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/win32ole/win32ole.c (Init_win32ole): make wrapper object
before making st_table.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/win32ole/win32ole.c: use rb_sym2str when the result strings
will not be modified.
* ext/win32ole/win32ole_event.c: ditto.
* ext/win32ole/win32ole_record.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
variable is passed by reference. [ruby-dev:48803] [Bug #10697]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e