зеркало из https://github.com/github/ruby.git
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.
This commit is contained in:
Родитель
dd830fab69
Коммит
f169931414
|
@ -3962,6 +3962,7 @@ check_nano_server(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LCID cWIN32OLE_lcid;
|
||||||
|
|
||||||
void
|
void
|
||||||
Init_win32ole(void)
|
Init_win32ole(void)
|
||||||
|
|
|
@ -112,8 +112,8 @@ struct oledata {
|
||||||
IDispatch *pDispatch;
|
IDispatch *pDispatch;
|
||||||
};
|
};
|
||||||
|
|
||||||
VALUE cWIN32OLE;
|
extern VALUE cWIN32OLE;
|
||||||
LCID cWIN32OLE_lcid;
|
extern LCID cWIN32OLE_lcid;
|
||||||
|
|
||||||
struct oledata *oledata_get_struct(VALUE obj);
|
struct oledata *oledata_get_struct(VALUE obj);
|
||||||
LPWSTR ole_vstr2wc(VALUE vstr);
|
LPWSTR ole_vstr2wc(VALUE vstr);
|
||||||
|
|
|
@ -60,6 +60,9 @@ ole_raise(HRESULT hr, VALUE ecs, const char *fmt, ...)
|
||||||
rb_exc_raise(rb_exc_new_str(ecs, msg));
|
rb_exc_raise(rb_exc_new_str(ecs, msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VALUE eWIN32OLERuntimeError;
|
||||||
|
VALUE eWIN32OLEQueryInterfaceError;
|
||||||
|
|
||||||
void
|
void
|
||||||
Init_win32ole_error(void)
|
Init_win32ole_error(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#ifndef WIN32OLE_ERROR_H
|
#ifndef WIN32OLE_ERROR_H
|
||||||
#define WIN32OLE_ERROR_H 1
|
#define WIN32OLE_ERROR_H 1
|
||||||
|
|
||||||
VALUE eWIN32OLERuntimeError;
|
extern VALUE eWIN32OLERuntimeError;
|
||||||
VALUE eWIN32OLEQueryInterfaceError;
|
extern VALUE eWIN32OLEQueryInterfaceError;
|
||||||
NORETURN(PRINTF_ARGS(void ole_raise(HRESULT hr, VALUE ecs, const char *fmt, ...), 3, 4));
|
NORETURN(PRINTF_ARGS(void ole_raise(HRESULT hr, VALUE ecs, const char *fmt, ...), 3, 4));
|
||||||
void Init_win32ole_error(void);
|
void Init_win32ole_error(void);
|
||||||
|
|
||||||
|
|
|
@ -923,6 +923,8 @@ folemethod_inspect(VALUE self)
|
||||||
return default_inspect(self, "WIN32OLE_METHOD");
|
return default_inspect(self, "WIN32OLE_METHOD");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VALUE cWIN32OLE_METHOD;
|
||||||
|
|
||||||
void Init_win32ole_method(void)
|
void Init_win32ole_method(void)
|
||||||
{
|
{
|
||||||
cWIN32OLE_METHOD = rb_define_class("WIN32OLE_METHOD", rb_cObject);
|
cWIN32OLE_METHOD = rb_define_class("WIN32OLE_METHOD", rb_cObject);
|
||||||
|
|
|
@ -7,7 +7,7 @@ struct olemethoddata {
|
||||||
UINT index;
|
UINT index;
|
||||||
};
|
};
|
||||||
|
|
||||||
VALUE cWIN32OLE_METHOD;
|
extern VALUE cWIN32OLE_METHOD;
|
||||||
VALUE folemethod_s_allocate(VALUE klass);
|
VALUE folemethod_s_allocate(VALUE klass);
|
||||||
VALUE ole_methods_from_typeinfo(ITypeInfo *pTypeInfo, int mask);
|
VALUE ole_methods_from_typeinfo(ITypeInfo *pTypeInfo, int mask);
|
||||||
VALUE create_win32ole_method(ITypeInfo *pTypeInfo, VALUE name);
|
VALUE create_win32ole_method(ITypeInfo *pTypeInfo, VALUE name);
|
||||||
|
|
|
@ -589,6 +589,8 @@ folerecord_inspect(VALUE self)
|
||||||
field);
|
field);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VALUE cWIN32OLE_RECORD;
|
||||||
|
|
||||||
void
|
void
|
||||||
Init_win32ole_record(void)
|
Init_win32ole_record(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef WIN32OLE_RECORD_H
|
#ifndef WIN32OLE_RECORD_H
|
||||||
#define WIN32OLE_RECORD_H 1
|
#define WIN32OLE_RECORD_H 1
|
||||||
|
|
||||||
VALUE cWIN32OLE_RECORD;
|
extern VALUE cWIN32OLE_RECORD;
|
||||||
void ole_rec2variant(VALUE rec, VARIANT *var);
|
void ole_rec2variant(VALUE rec, VARIANT *var);
|
||||||
void olerecord_set_ivar(VALUE obj, IRecordInfo *pri, void *prec);
|
void olerecord_set_ivar(VALUE obj, IRecordInfo *pri, void *prec);
|
||||||
VALUE create_win32ole_record(IRecordInfo *pri, void *prec);
|
VALUE create_win32ole_record(IRecordInfo *pri, void *prec);
|
||||||
|
|
|
@ -883,6 +883,8 @@ foletype_inspect(VALUE self)
|
||||||
return default_inspect(self, "WIN32OLE_TYPE");
|
return default_inspect(self, "WIN32OLE_TYPE");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VALUE cWIN32OLE_TYPE;
|
||||||
|
|
||||||
void Init_win32ole_type(void)
|
void Init_win32ole_type(void)
|
||||||
{
|
{
|
||||||
cWIN32OLE_TYPE = rb_define_class("WIN32OLE_TYPE", rb_cObject);
|
cWIN32OLE_TYPE = rb_define_class("WIN32OLE_TYPE", rb_cObject);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#ifndef WIN32OLE_TYPE_H
|
#ifndef WIN32OLE_TYPE_H
|
||||||
#define WIN32OLE_TYPE_H 1
|
#define WIN32OLE_TYPE_H 1
|
||||||
VALUE cWIN32OLE_TYPE;
|
extern VALUE cWIN32OLE_TYPE;
|
||||||
VALUE create_win32ole_type(ITypeInfo *pTypeInfo, VALUE name);
|
VALUE create_win32ole_type(ITypeInfo *pTypeInfo, VALUE name);
|
||||||
ITypeInfo *itypeinfo(VALUE self);
|
ITypeInfo *itypeinfo(VALUE self);
|
||||||
VALUE ole_type_from_itypeinfo(ITypeInfo *pTypeInfo);
|
VALUE ole_type_from_itypeinfo(ITypeInfo *pTypeInfo);
|
||||||
|
|
|
@ -822,6 +822,8 @@ foletypelib_inspect(VALUE self)
|
||||||
return default_inspect(self, "WIN32OLE_TYPELIB");
|
return default_inspect(self, "WIN32OLE_TYPELIB");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VALUE cWIN32OLE_TYPELIB;
|
||||||
|
|
||||||
void
|
void
|
||||||
Init_win32ole_typelib(void)
|
Init_win32ole_typelib(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef WIN32OLE_TYPELIB_H
|
#ifndef WIN32OLE_TYPELIB_H
|
||||||
#define WIN32OLE_TYPELIB_H 1
|
#define WIN32OLE_TYPELIB_H 1
|
||||||
|
|
||||||
VALUE cWIN32OLE_TYPELIB;
|
extern VALUE cWIN32OLE_TYPELIB;
|
||||||
|
|
||||||
void Init_win32ole_typelib(void);
|
void Init_win32ole_typelib(void);
|
||||||
ITypeLib * itypelib(VALUE self);
|
ITypeLib * itypelib(VALUE self);
|
||||||
|
|
|
@ -365,6 +365,8 @@ folevariable_inspect(VALUE self)
|
||||||
return make_inspect("WIN32OLE_VARIABLE", detail);
|
return make_inspect("WIN32OLE_VARIABLE", detail);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VALUE cWIN32OLE_VARIABLE;
|
||||||
|
|
||||||
void Init_win32ole_variable(void)
|
void Init_win32ole_variable(void)
|
||||||
{
|
{
|
||||||
cWIN32OLE_VARIABLE = rb_define_class("WIN32OLE_VARIABLE", rb_cObject);
|
cWIN32OLE_VARIABLE = rb_define_class("WIN32OLE_VARIABLE", rb_cObject);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef WIN32OLE_VARIABLE_H
|
#ifndef WIN32OLE_VARIABLE_H
|
||||||
#define WIN32OLE_VARIABLE_H 1
|
#define WIN32OLE_VARIABLE_H 1
|
||||||
|
|
||||||
VALUE cWIN32OLE_VARIABLE;
|
extern VALUE cWIN32OLE_VARIABLE;
|
||||||
VALUE create_win32ole_variable(ITypeInfo *pTypeInfo, UINT index, VALUE name);
|
VALUE create_win32ole_variable(ITypeInfo *pTypeInfo, UINT index, VALUE name);
|
||||||
void Init_win32ole_variable(void);
|
void Init_win32ole_variable(void);
|
||||||
|
|
||||||
|
|
|
@ -689,6 +689,8 @@ ole_variant2variant(VALUE val, VARIANT *var)
|
||||||
VariantCopy(var, &(pvar->var));
|
VariantCopy(var, &(pvar->var));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VALUE cWIN32OLE_VARIANT;
|
||||||
|
|
||||||
void
|
void
|
||||||
Init_win32ole_variant(void)
|
Init_win32ole_variant(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef WIN32OLE_VARIANT_H
|
#ifndef WIN32OLE_VARIANT_H
|
||||||
#define WIN32OLE_VARIANT_H 1
|
#define WIN32OLE_VARIANT_H 1
|
||||||
|
|
||||||
VALUE cWIN32OLE_VARIANT;
|
extern VALUE cWIN32OLE_VARIANT;
|
||||||
void ole_variant2variant(VALUE val, VARIANT *var);
|
void ole_variant2variant(VALUE val, VARIANT *var);
|
||||||
void Init_win32ole_variant(void);
|
void Init_win32ole_variant(void);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include "win32ole.h"
|
#include "win32ole.h"
|
||||||
|
|
||||||
|
VALUE mWIN32OLE_VARIANT;
|
||||||
|
|
||||||
void Init_win32ole_variant_m(void)
|
void Init_win32ole_variant_m(void)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef WIN32OLE_VARIANT_M_H
|
#ifndef WIN32OLE_VARIANT_M_H
|
||||||
#define WIN32OLE_VARIANT_M_H 1
|
#define WIN32OLE_VARIANT_M_H 1
|
||||||
|
|
||||||
VALUE mWIN32OLE_VARIANT;
|
extern VALUE mWIN32OLE_VARIANT;
|
||||||
void Init_win32ole_variant_m(void);
|
void Init_win32ole_variant_m(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Загрузка…
Ссылка в новой задаче