Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1a129283
Commit
1a129283
authored
Oct 17, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Get rid of no longer needed ITypeInfo in BuiltinDisp.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4a30e699
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
88 deletions
+3
-88
global.c
dlls/vbscript/global.c
+3
-14
vbscript.h
dlls/vbscript/vbscript.h
+0
-13
vbscript_main.c
dlls/vbscript/vbscript_main.c
+0
-61
No files found.
dlls/vbscript/global.c
View file @
1a129283
...
...
@@ -268,8 +268,7 @@ static const IDispatchVtbl BuiltinDispVtbl = {
Builtin_Invoke
};
static
HRESULT
create_builtin_dispatch
(
script_ctx_t
*
ctx
,
const
builtin_prop_t
*
members
,
size_t
member_cnt
,
ITypeInfo
*
typeinfo
,
BuiltinDisp
**
ret
)
static
HRESULT
create_builtin_dispatch
(
script_ctx_t
*
ctx
,
const
builtin_prop_t
*
members
,
size_t
member_cnt
,
BuiltinDisp
**
ret
)
{
BuiltinDisp
*
disp
;
...
...
@@ -281,7 +280,6 @@ static HRESULT create_builtin_dispatch(script_ctx_t *ctx, const builtin_prop_t *
disp
->
members
=
members
;
disp
->
member_cnt
=
member_cnt
;
disp
->
ctx
=
ctx
;
disp
->
typeinfo
=
typeinfo
;
*
ret
=
disp
;
return
S_OK
;
...
...
@@ -2858,14 +2856,9 @@ void detach_global_objects(script_ctx_t *ctx)
HRESULT
init_global
(
script_ctx_t
*
ctx
)
{
ITypeInfo
*
typeinfo
;
HRESULT
hres
;
hres
=
get_typeinfo
(
GlobalObj_tid
,
&
typeinfo
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
create_builtin_dispatch
(
ctx
,
global_props
,
ARRAY_SIZE
(
global_props
),
typeinfo
,
&
ctx
->
global_obj
);
hres
=
create_builtin_dispatch
(
ctx
,
global_props
,
ARRAY_SIZE
(
global_props
),
&
ctx
->
global_obj
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -2873,9 +2866,5 @@ HRESULT init_global(script_ctx_t *ctx)
if
(
FAILED
(
hres
))
return
hres
;
hres
=
get_typeinfo
(
ErrObj_tid
,
&
typeinfo
);
if
(
FAILED
(
hres
))
return
hres
;
return
create_builtin_dispatch
(
ctx
,
err_props
,
ARRAY_SIZE
(
err_props
),
typeinfo
,
&
ctx
->
err_obj
);
return
create_builtin_dispatch
(
ctx
,
err_props
,
ARRAY_SIZE
(
err_props
),
&
ctx
->
err_obj
);
}
dlls/vbscript/vbscript.h
View file @
1a129283
...
...
@@ -141,7 +141,6 @@ typedef struct {
size_t
member_cnt
;
const
builtin_prop_t
*
members
;
script_ctx_t
*
ctx
;
ITypeInfo
*
typeinfo
;
}
BuiltinDisp
;
HRESULT
create_vbdisp
(
const
class_desc_t
*
,
vbdisp_t
**
)
DECLSPEC_HIDDEN
;
...
...
@@ -358,18 +357,6 @@ HRESULT report_script_error(script_ctx_t*) DECLSPEC_HIDDEN;
void
detach_global_objects
(
script_ctx_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
get_builtin_id
(
BuiltinDisp
*
,
const
WCHAR
*
,
DISPID
*
)
DECLSPEC_HIDDEN
;
#define TID_LIST \
XDIID(ErrObj) \
XDIID(GlobalObj)
typedef
enum
{
#define XDIID(iface) iface ## _tid,
TID_LIST
#undef XDIID
LAST_tid
}
tid_t
;
HRESULT
get_typeinfo
(
tid_t
,
ITypeInfo
**
)
DECLSPEC_HIDDEN
;
void
release_regexp_typelib
(
void
)
DECLSPEC_HIDDEN
;
static
inline
BOOL
is_int32
(
double
d
)
...
...
dlls/vbscript/vbscript_main.c
View file @
1a129283
...
...
@@ -35,66 +35,6 @@ DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
static
HINSTANCE
vbscript_hinstance
;
static
ITypeLib
*
typelib
;
static
ITypeInfo
*
typeinfos
[
LAST_tid
];
static
REFIID
tid_ids
[]
=
{
#define XDIID(iface) &DIID_ ## iface,
TID_LIST
#undef XDIID
};
HRESULT
get_typeinfo
(
tid_t
tid
,
ITypeInfo
**
typeinfo
)
{
HRESULT
hres
;
if
(
!
typelib
)
{
ITypeLib
*
tl
;
static
const
WCHAR
vbscript_dll1W
[]
=
{
'v'
,
'b'
,
's'
,
'c'
,
'r'
,
'i'
,
'p'
,
't'
,
'.'
,
'd'
,
'l'
,
'l'
,
'\\'
,
'1'
,
0
};
hres
=
LoadTypeLib
(
vbscript_dll1W
,
&
tl
);
if
(
FAILED
(
hres
))
{
ERR
(
"LoadRegTypeLib failed: %08x
\n
"
,
hres
);
return
hres
;
}
if
(
InterlockedCompareExchangePointer
((
void
**
)
&
typelib
,
tl
,
NULL
))
ITypeLib_Release
(
tl
);
}
if
(
!
typeinfos
[
tid
])
{
ITypeInfo
*
ti
;
hres
=
ITypeLib_GetTypeInfoOfGuid
(
typelib
,
tid_ids
[
tid
],
&
ti
);
if
(
FAILED
(
hres
))
{
ERR
(
"GetTypeInfoOfGuid(%s) failed: %08x
\n
"
,
debugstr_guid
(
tid_ids
[
tid
]),
hres
);
return
hres
;
}
if
(
InterlockedCompareExchangePointer
((
void
**
)(
typeinfos
+
tid
),
ti
,
NULL
))
ITypeInfo_Release
(
ti
);
}
*
typeinfo
=
typeinfos
[
tid
];
return
S_OK
;
}
static
void
release_typelib
(
void
)
{
unsigned
i
;
if
(
!
typelib
)
return
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
typeinfos
);
i
++
)
{
if
(
typeinfos
[
i
])
ITypeInfo_Release
(
typeinfos
[
i
]);
}
ITypeLib_Release
(
typelib
);
}
BSTR
get_vbscript_string
(
int
id
)
{
WCHAR
buf
[
512
];
...
...
@@ -316,7 +256,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
break
;
case
DLL_PROCESS_DETACH
:
if
(
lpv
)
break
;
release_typelib
();
release_regexp_typelib
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment