aboutsummaryrefslogtreecommitdiffstats
path: root/ext/win32ole
Commit message (Collapse)AuthorAgeFilesLines
* Add string encoding IBM720 alias CP720 (#3803)Lars Kanis2020-11-221-0/+1
| | | | | | The mapping table is generated from the ICU project: https://github.com/unicode-org/icu/blob/master/icu4c/source/data/mappings/ibm-720_P100-1997.ucm Fixes bug 16233 : https://bugs.ruby-lang.org/issues/16233
* Promote win32ole to default gems.Hiroshi SHIBATA2020-10-301-0/+21
| | | | | But win32ole gem is still experimental for 3.0.0-preview2. I'm working to extract this library on https://github.com/ruby/win32ole.
* win32ole: separate global variable declarations and definitionsNobuyoshi Nakada2020-05-1018-11/+29
| | | | | | | | | | 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.
* Suppress C4267 "possible loss of data" warningsNobuyoshi Nakada2020-04-171-1/+1
| | | | Just cast down explicitly.
* Suppress C4267 "possible loss of data" warningsNobuyoshi Nakada2020-04-171-1/+1
|
* Warn on access/modify of $SAFE, and remove effects of modifying $SAFEJeremy Evans2019-11-182-16/+0
| | | | | | | | | | | | | | | | | 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.
* Fix call-seq of OpenSSL.fips_mode and WIN32OLE_METHOD#name [ci skip]kazu2018-11-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/lib/win32ole.rb (methods): COM method elements should besuke2018-09-261-1/+1
| | | | | | | | symbol in return value of methods. * test/win32ole/test_win32ole.rb ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/win32ole/win32ole.c: fix typo. [ci skip]suke2018-03-101-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c: fix url of ActiveState. Thanks to Kazuhiro ↵suke2018-03-101-1/+2
| | | | | | Nishiyama. [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* no ID cache in Init functionsnobu2018-02-162-0/+2
| | | | | | Init functions are called only once, cache is useless. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hide internal data objectsnobu2017-12-041-2/+2
| | | | | | | | | | * marshal.c (compat_allocator_table): hide the wrapper object of compat_allocator_tbl. * process.c (rb_execarg_new): hide wrapper objects of struct rb_execarg. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c: use WIN32OLEQueryInterfaceError when failedsuke2017-11-183-15/+15
| | | | | | | | to query com interface. * ext/win32ole/win32ole_event.c: ditto. * ext/win32ole/win32ole_method.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c(ole_const_load): suppress constant redefinitionsuke2017-11-111-2/+4
| | | | | | warnings when WIN32OLE.const_load [Bug #14085] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/win32ole/lib/win32ole.rb (metods): rescue WIN32OLEQueryInterfaceError.suke2017-11-051-1/+9
| | | | | | | test/win32ole/test_win32ole.rb: add test for WIN32OLE#methods git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole_error.c: add WIN32OLEQueryInterfaceError.suke2017-11-054-4/+6
| | | | | | | | | | | | | | * 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
* Fix a typo [ci skip]kazu2017-11-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/lib/win32ole.rb :add WIN32OLE#methods. WIN32OLE might worksuke2017-11-031-0/+25
| | | | | | | well with did_you_mean gem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/win32ole/win32ole.c (fole_missing): set receiver in NoMethodError.suke2017-10-211-12/+30
| | | | | | | test/win32ole/test_win32ole.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c (fole_initialize): fix typo. thanks to Gray Wolf. suke2017-09-021-4/+4
| | | | | | | [Feature #13828] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c (fole_initialize): support licensed COM server. ↵suke2017-08-261-5/+41
| | | | | | Thanks to Gray Wolf. [Feature :#13828] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove extra call to OleInitializenobu2017-05-261-1/+0
| | | | | | | [Fix GH-1629] Signed-off-by: Matt Wrock <matt@mattwrock.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/win32ole/win32ole_variant.c (ole_val2variant_err): use FIXNUM_P, RB_TYPE_Psuke2017-04-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/win32ole/win32ole.c(ole_initialize): avoid to fail in Windows nano server. suke2017-02-251-4/+33
| | | | | | | This is experimental. Thanks to mwrock, Ethan Brown. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32ole.c: suppress warningsnobu2016-11-201-1/+1
| | | | | | | * 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: independent of libgcc_s_seh-1.dll [Bug #12959] suke2016-11-191-1/+1
| | | | | | | Thanks to Tsuyoshi Morita for bug report. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [DOC] replace Fixnum with Integer [ci skip]nobu2016-10-261-1/+1
| | | | | | * numeric.c: [DOC] update document for Integer class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/win32ole/*.c, ext/win32ole/win32ole.h: use RB_INT2FIX instead ofsuke2016-10-0710-132/+132
| | | | | | | | INT2FIX, and so on. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typo [ci skip]kazu2016-10-041-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32ole.c: fix long conversionnobu2016-08-131-1/+1
| | | | | | | * 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
* win32ole.c: fix long conversionnobu2016-08-131-7/+10
| | | | | | | * 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
* * ext/win32ole/win32ole.c (ole_val2variant): fix integer conversion insuke2016-08-121-3/+9
| | | | | | | | cygwin64. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use true and false [ci skip]nobu2016-08-091-1/+1
| | | | | | | | | | * ext/tk/lib/tk/texttag.rb, ext/tk/sample/tcltklib/sample2.rb, ext/tk/sample/tkline.rb, ext/tk/sample/tktimer.rb: use true and false instead of TRUE and FALSE. * ext/win32ole/sample/ienavi.rb (stop_msg_loop): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/sample/excel1.rb, ext/win32ole/sample/excel2.rb,suke2016-08-085-7/+7
| | | | | | | | | | ext/win32ole/sample/excel3.rb, ext/win32ole/sample/ie.rb, ext/win32ole/sample/ienavi.rb, ext/win32ole/sample/ienavi2.rb: use true instead of deprecated TRUE. [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rb_funcallvnobu2016-07-291-1/+1
| | | | | | | * *.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
* win32ole.c: share the contentnobu2016-05-201-2/+2
| | | | | | | * 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
* win32ole.c: remove dead codenobu2016-05-201-5/+0
| | | | | | | * 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
* win32ole_error.h: add attributesnobu2016-05-081-1/+1
| | | | | | | * ext/win32ole/win32ole_error.h (ole_raise): add attributes, NORETURN and PRINTF_ARGS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32ole_event.c: use rb_write_error_strnobu2016-03-071-1/+3
| | | | | | | | | * ext/win32ole/win32ole_event.c (rescue_callback): use rb_write_error_str instead of rb_write_error, to respect the encoding and prevent the message from GC. * internal.h (rb_write_error_str): export. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2015-12-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c (ole_variant2val): refactoring.suke2015-12-271-10/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c (ole_vstr2wc, ole_variant2val): fix blanksuke2015-12-271-4/+13
| | | | | | | | | | string conversion. [Bug #11880] Thanks Akio Tajima for the patch! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* handle ext/ as r53141naruse2015-12-1612-0/+12
| | | | | | | | g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&# frozen_string_literal: false\n");f.rewind;f.write s}}' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32ole.c: check argument typenobu2015-12-131-0/+5
| | | | | | | | * 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/**/*.c (*_memsize): same as r52986 for extensions.ko12015-12-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use rb_check_arity [ci skip]nobu2015-10-252-6/+2
| | | | | | | * ext: use rb_check_arity and rb_error_arity to raise ArgumentError. [Feature #9025] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32ole.c: fix symbol conditionnobu2015-09-211-1/+1
| | | | | | | * 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
* win32ole.c: inadvertent symbol creationnobu2015-09-211-8/+10
| | | | | | | * ext/win32ole/win32ole.c (GetIDsOfNames, fole_missing): avoid inadvertent symbol creation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32ole.c: refactornobu2015-09-211-21/+25
| | | | | | * ext/win32ole/win32ole.c (ole_wc2mb): refactor. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32ole.c: make ole_mb2wc more genericnobu2015-09-211-34/+15
| | | | | | | | * ext/win32ole/win32ole.c (ole_vstr2wc): use ole_mb2wc. * ext/win32ole/win32ole.c (ole_mb2wc): parametrize code page. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e