Граф коммитов

291 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 94b87084a6 [ruby/win32ole] win32ole.c: repeated code
* ext/win32ole/win32ole.c (ole_variant2val): reduce repeated code
  between byref and byval.

https://github.com/ruby/win32ole/commit/e753c6abdd
2024-07-12 09:45:06 +00:00
Nobuyoshi Nakada 5ac9c8f01b [ruby/win32ole] [DOC] Remove spaces inside parentheses
https://github.com/ruby/win32ole/commit/57e4a38465
2024-01-28 15:27:19 +00:00
Nobuyoshi Nakada 1e2d088dd3 [ruby/win32ole] Use the scoped names in `inspect` and error messages
https://github.com/ruby/win32ole/commit/2f51493bd1
2024-01-28 15:25:34 +00:00
Nobuyoshi Nakada baef72da36 [ruby/win32ole] [DOC] Update class names using the scoped names
https://github.com/ruby/win32ole/commit/2c5d193da7
2024-01-28 15:25:34 +00:00
Hiroshi SHIBATA eaf0ca4cfe [ruby/win32ole] Bump up 1.8.10
https://github.com/ruby/win32ole/commit/9a18f388a9
2023-11-07 05:52:50 +00:00
Hiroshi SHIBATA b9b43a1020 [ruby/win32ole] Reuse WIN32OLE_VERSION for gem version
https://github.com/ruby/win32ole/commit/bff3ea8b0b
2023-04-21 04:46:10 +00:00
Takashi Kokubun 5b21e94beb Expand tabs [ci skip]
[Misc #18891]
2022-07-21 09:42:04 -07:00
xtkoba 63b1633f86 [ruby/win32ole] Get rid of potential undefined behavior
See https://bugs.llvm.org/show_bug.cgi?id=50236

https://github.com/ruby/win32ole/commit/019ec2b3cb
2022-03-15 08:33:40 +09:00
Daisuke Fujimura (fd0) e451f0f678 Fix `_MSC_VER` warnings 2021-06-03 00:07:25 +09:00
Lars Kanis d403591b34
Add string encoding IBM720 alias CP720 (#3803)
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
2020-11-22 22:23:40 +09:00
Nobuyoshi Nakada f169931414
win32ole: separate global variable declarations and definitions
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.
2020-05-10 21:37:59 +09:00
Nobuyoshi Nakada 75a0447c15
Suppress C4267 "possible loss of data" warnings
Just cast down explicitly.
2020-04-17 09:24:46 +09:00
Nobuyoshi Nakada a0bc3f2a1c
Suppress C4267 "possible loss of data" warnings 2020-04-17 00:53:26 +09:00
Jeremy Evans c5c05460ac Warn on access/modify of $SAFE, and remove effects of modifying $SAFE
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.
2019-11-18 01:00:25 +02:00
suke e144481ed5 ext/win32ole/win32ole.c: fix typo. [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-10 06:46:01 +00:00
suke b11a38fa48 * ext/win32ole/win32ole.c: fix url of ActiveState. Thanks to Kazuhiro Nishiyama. [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-10 02:16:30 +00:00
nobu 340fe20a3b hide internal data objects
* 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
2017-12-04 07:37:21 +00:00
suke 3c0cf7856a * ext/win32ole/win32ole.c: use WIN32OLEQueryInterfaceError when failed
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
2017-11-18 02:53:39 +00:00
suke 856aca46b7 * ext/win32ole/win32ole.c(ole_const_load): suppress constant redefinition
warnings when WIN32OLE.const_load [Bug #14085]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-11 03:57:02 +00:00
suke 8930a4257d * ext/win32ole/win32ole_error.c: add WIN32OLEQueryInterfaceError.
* 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
2017-11-05 00:30:57 +00:00
suke 6f889b50d9 ext/win32ole/win32ole.c (fole_missing): set receiver in NoMethodError.
test/win32ole/test_win32ole.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21 23:57:10 +00:00
suke 08d0611477 * ext/win32ole/win32ole.c (fole_initialize): fix typo. thanks to Gray Wolf.
[Feature #13828]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-02 00:26:37 +00:00
suke 917beef327 * ext/win32ole/win32ole.c (fole_initialize): support licensed COM server. Thanks to Gray Wolf. [Feature :#13828]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-26 23:39:43 +00:00
nobu e3c140681a remove extra call to OleInitialize
[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
2017-05-26 09:49:20 +00:00
suke 8feb977918 ext/win32ole/win32ole.c(ole_initialize): avoid to fail in Windows nano server.
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
2017-02-25 22:28:22 +00:00
nobu 4ba9778461 win32ole.c: suppress warnings
* 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
2016-11-20 06:53:39 +00:00
suke 173f7fdcc5 * ext/win32ole/win32ole.c: independent of libgcc_s_seh-1.dll [Bug #12959]
Thanks to Tsuyoshi Morita for bug report.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-19 23:51:49 +00:00
suke 5dd01af28f ext/win32ole/*.c, ext/win32ole/win32ole.h: use RB_INT2FIX instead of
INT2FIX, and so on.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-07 10:24:56 +00:00
nobu a2a6c98e51 win32ole.c: fix long conversion
* 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
2016-08-13 13:01:13 +00:00
nobu 9e778a8ad5 win32ole.c: fix long conversion
* 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
2016-08-13 01:49:16 +00:00
suke d5c2261bd6 * ext/win32ole/win32ole.c (ole_val2variant): fix integer conversion in
cygwin64.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-12 22:54:23 +00:00
nobu c463366dfd rb_funcallv
* *.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
2016-07-29 11:57:14 +00:00
nobu 27c13f82b9 win32ole.c: share the content
* 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
2016-05-20 12:17:14 +00:00
nobu 2eb1ec25d1 win32ole.c: remove dead code
* 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
2016-05-20 11:47:16 +00:00
svn b8d9770b6c * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-27 14:34:16 +00:00
suke db8dcd1b27 * ext/win32ole/win32ole.c (ole_variant2val): refactoring.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-27 14:34:11 +00:00
suke 2a16594d29 * ext/win32ole/win32ole.c (ole_vstr2wc, ole_variant2val): fix blank
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
2015-12-27 00:48:20 +00:00
nobu 739d9a37cb win32ole.c: check argument type
* 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
2015-12-13 09:19:20 +00:00
ko1 dff42b0ea0 * ext/**/*.c (*_memsize): same as r52986 for extensions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09 01:01:17 +00:00
nobu 4dcdbb4afc win32ole.c: fix symbol condition
* 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
2015-09-21 15:46:44 +00:00
nobu 5563173afb win32ole.c: inadvertent symbol creation
* 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
2015-09-21 15:29:20 +00:00
nobu 288fa8da63 win32ole.c: refactor
* ext/win32ole/win32ole.c (ole_wc2mb): refactor.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-21 14:52:26 +00:00
nobu 068394a7d6 win32ole.c: make ole_mb2wc more generic
* 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
2015-09-21 14:40:57 +00:00
hsbt 0eb195cee3 * ext/win32ole/win32ole.c: fix a typo. Patch by @davydovanton
[fix GH-923]
* include/ruby/st.h: ditto.
* include/ruby/util.h: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-04 02:53:11 +00:00
nobu 828de1a06d win32ole.c: wrapper object before alloc
* 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
2015-05-28 06:46:17 +00:00
nobu 760ae4a8b9 win32ole.c: use rb_sym2str
* 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
2015-04-14 03:36:40 +00:00
suke 99eaebcea3 * ext/win32ole/win32ole.c (Init_win32ole): should not use atexit to
free allocated hash table to avoid error on Cygwin.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-04 11:30:37 +00:00
suke 8f67e9807a * ext/win32ole/win32ole.c (ole_invoke): avoid SEGV when VT_RECORD
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
2015-01-18 02:53:18 +00:00
nobu 1db0393eb1 uninitialized variable
* process.c (rb_spawn_process): get rid of usage of uninitialized
  variable.
  reported by Denis Denisov <denji0k AT gmail.com>.
* regexec.c (match_at): ditto.
* ext/win32ole/win32ole.c (ole_wc2mb_alloc, ole_vstr2wc, ole_mb2wc):
  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-26 06:09:11 +00:00
suke f9dcfb2bca * ext/win32ole/win32ole.c: use typed data for com_hash.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-02 12:34:52 +00:00