Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
cfad9c3d
Commit
cfad9c3d
authored
May 27, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp90: Add an msvcp-specific size_t to avoid casts in traces.
parent
d74b339e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
32 deletions
+33
-32
ios.c
dlls/msvcp90/ios.c
+9
-9
memory.c
dlls/msvcp90/memory.c
+13
-13
msvcp90.h
dlls/msvcp90/msvcp90.h
+10
-9
msvcp90_main.c
dlls/msvcp90/msvcp90_main.c
+1
-1
string.c
dlls/msvcp90/string.c
+0
-0
No files found.
dlls/msvcp90/ios.c
View file @
cfad9c3d
...
...
@@ -85,12 +85,12 @@ MSVCP_bool ios_base_Sync = FALSE;
typedef
struct
_ios_base
{
const
vtable_ptr
*
vtable
;
size_t
stdstr
;
MSVCP_
size_t
stdstr
;
IOSB_iostate
state
;
IOSB_iostate
except
;
IOSB_fmtflags
fmtfl
;
size_t
prec
;
size_t
wide
;
MSVCP_
size_t
prec
;
MSVCP_
size_t
wide
;
IOS_BASE_iosarray
*
arr
;
IOS_BASE_fnarray
*
calls
;
locale
*
loc
;
...
...
@@ -484,16 +484,16 @@ MSVCP_long* __thiscall ios_base_iword(ios_base *this, int index)
/* ?precision@ios_base@std@@QAEHH@Z */
/* ?precision@ios_base@std@@QEAA_J_J@Z */
DEFINE_THISCALL_WRAPPER
(
ios_base_precision_set
,
8
)
size_t
__thiscall
ios_base_precision_set
(
ios_base
*
this
,
size_t
precision
)
MSVCP_size_t
__thiscall
ios_base_precision_set
(
ios_base
*
this
,
MSVCP_
size_t
precision
)
{
FIXME
(
"(%p %lu) stub
\n
"
,
this
,
(
unsigned
long
)
precision
);
FIXME
(
"(%p %lu) stub
\n
"
,
this
,
precision
);
return
0
;
}
/* ?precision@ios_base@std@@QBEHXZ */
/* ?precision@ios_base@std@@QEBA_JXZ */
DEFINE_THISCALL_WRAPPER
(
ios_base_precision_get
,
4
)
size_t
__thiscall
ios_base_precision_get
(
const
ios_base
*
this
)
MSVCP_
size_t
__thiscall
ios_base_precision_get
(
const
ios_base
*
this
)
{
FIXME
(
"(%p) stub
\n
"
,
this
);
return
0
;
...
...
@@ -584,16 +584,16 @@ void __thiscall ios_base_unsetf(ios_base *this, IOSB_fmtflags flags)
/* ?width@ios_base@std@@QAEHH@Z */
/* ?width@ios_base@std@@QEAA_J_J@Z */
DEFINE_THISCALL_WRAPPER
(
ios_base_width_set
,
8
)
size_t
__thiscall
ios_base_width_set
(
ios_base
*
this
,
size_t
width
)
MSVCP_size_t
__thiscall
ios_base_width_set
(
ios_base
*
this
,
MSVCP_
size_t
width
)
{
FIXME
(
"(%p %lu) stub
\n
"
,
this
,
(
unsigned
long
)
width
);
FIXME
(
"(%p %lu) stub
\n
"
,
this
,
width
);
return
0
;
}
/* ?width@ios_base@std@@QBEHXZ */
/* ?width@ios_base@std@@QEBA_JXZ */
DEFINE_THISCALL_WRAPPER
(
ios_base_width_get
,
4
)
size_t
__thiscall
ios_base_width_get
(
ios_base
*
this
)
MSVCP_
size_t
__thiscall
ios_base_width_get
(
ios_base
*
this
)
{
FIXME
(
"(%p) stub
\n
"
,
this
);
return
0
;
...
...
dlls/msvcp90/memory.c
View file @
cfad9c3d
...
...
@@ -70,7 +70,7 @@ void* __thiscall MSVCP_allocator_char_assign(void *this, void *assign)
/* ?deallocate@?$allocator@D@std@@QAEXPADI@Z */
/* ?deallocate@?$allocator@D@std@@QEAAXPEAD_K@Z */
DEFINE_THISCALL_WRAPPER
(
MSVCP_allocator_char_deallocate
,
12
);
void
__thiscall
MSVCP_allocator_char_deallocate
(
void
*
this
,
char
*
ptr
,
size_t
size
)
void
__thiscall
MSVCP_allocator_char_deallocate
(
void
*
this
,
char
*
ptr
,
MSVCP_
size_t
size
)
{
MSVCRT_operator_delete
(
ptr
);
}
...
...
@@ -78,7 +78,7 @@ void __thiscall MSVCP_allocator_char_deallocate(void *this, char *ptr, size_t si
/* ?allocate@?$allocator@D@std@@QAEPADI@Z */
/* ?allocate@?$allocator@D@std@@QEAAPEAD_K@Z */
DEFINE_THISCALL_WRAPPER
(
MSVCP_allocator_char_allocate
,
8
);
char
*
__thiscall
MSVCP_allocator_char_allocate
(
void
*
this
,
size_t
count
)
char
*
__thiscall
MSVCP_allocator_char_allocate
(
void
*
this
,
MSVCP_
size_t
count
)
{
return
MSVCRT_operator_new
(
sizeof
(
char
[
count
]));
}
...
...
@@ -87,7 +87,7 @@ char* __thiscall MSVCP_allocator_char_allocate(void *this, size_t count)
/* ?allocate@?$allocator@D@std@@QEAAPEAD_KPEBX@Z */
DEFINE_THISCALL_WRAPPER
(
MSVCP_allocator_char_allocate_hint
,
12
);
char
*
__thiscall
MSVCP_allocator_char_allocate_hint
(
void
*
this
,
size_t
count
,
const
void
*
hint
)
MSVCP_
size_t
count
,
const
void
*
hint
)
{
/* Native ignores hint */
return
MSVCP_allocator_char_allocate
(
this
,
count
);
...
...
@@ -111,7 +111,7 @@ void __thiscall MSVCP_allocator_char_destroy(void *this, char *ptr)
/* ?max_size@?$allocator@D@std@@QBEIXZ */
/* ?max_size@?$allocator@D@std@@QEBA_KXZ */
DEFINE_THISCALL_WRAPPER
(
MSVCP_allocator_char_max_size
,
4
);
size_t
__thiscall
MSVCP_allocator_char_max_size
(
void
*
this
)
MSVCP_
size_t
__thiscall
MSVCP_allocator_char_max_size
(
void
*
this
)
{
return
UINT_MAX
/
sizeof
(
char
);
}
...
...
@@ -162,7 +162,7 @@ void* __thiscall MSVCP_allocator_wchar_assign(void *this, void *assign)
/* ?deallocate@?$allocator@_W@std@@QEAAXPEA_W_K@Z */
DEFINE_THISCALL_WRAPPER
(
MSVCP_allocator_wchar_deallocate
,
12
)
void
__thiscall
MSVCP_allocator_wchar_deallocate
(
void
*
this
,
wchar_t
*
ptr
,
size_t
size
)
wchar_t
*
ptr
,
MSVCP_
size_t
size
)
{
MSVCRT_operator_delete
(
ptr
);
}
...
...
@@ -170,7 +170,7 @@ void __thiscall MSVCP_allocator_wchar_deallocate(void *this,
/* ?allocate@?$allocator@_W@std@@QAEPA_WI@Z */
/* ?allocate@?$allocator@_W@std@@QEAAPEA_W_K@Z */
DEFINE_THISCALL_WRAPPER
(
MSVCP_allocator_wchar_allocate
,
8
)
wchar_t
*
__thiscall
MSVCP_allocator_wchar_allocate
(
void
*
this
,
size_t
count
)
wchar_t
*
__thiscall
MSVCP_allocator_wchar_allocate
(
void
*
this
,
MSVCP_
size_t
count
)
{
if
(
UINT_MAX
/
count
<
sizeof
(
wchar_t
))
{
throw_exception
(
EXCEPTION_BAD_ALLOC
,
NULL
);
...
...
@@ -184,7 +184,7 @@ wchar_t* __thiscall MSVCP_allocator_wchar_allocate(void *this, size_t count)
/* ?allocate@?$allocator@_W@std@@QEAAPEA_W_KPEBX@Z */
DEFINE_THISCALL_WRAPPER
(
MSVCP_allocator_wchar_allocate_hint
,
12
)
wchar_t
*
__thiscall
MSVCP_allocator_wchar_allocate_hint
(
void
*
this
,
size_t
count
,
const
void
*
hint
)
MSVCP_
size_t
count
,
const
void
*
hint
)
{
return
MSVCP_allocator_wchar_allocate
(
this
,
count
);
}
...
...
@@ -208,7 +208,7 @@ void __thiscall MSVCP_allocator_wchar_destroy(void *this, char *ptr)
/* ?max_size@?$allocator@_W@std@@QBEIXZ */
/* ?max_size@?$allocator@_W@std@@QEBA_KXZ */
DEFINE_THISCALL_WRAPPER
(
MSVCP_allocator_wchar_max_size
,
4
)
size_t
__thiscall
MSVCP_allocator_wchar_max_size
(
void
*
this
)
MSVCP_
size_t
__thiscall
MSVCP_allocator_wchar_max_size
(
void
*
this
)
{
return
UINT_MAX
/
sizeof
(
wchar_t
);
}
...
...
@@ -260,7 +260,7 @@ void* __thiscall MSVCP_allocator_short_assign(void *this, void *assign)
/* ?deallocate@?$allocator@G@std@@QEAAXPEAG_K@Z */
DEFINE_THISCALL_WRAPPER
(
MSVCP_allocator_short_deallocate
,
12
)
void
__thiscall
MSVCP_allocator_short_deallocate
(
void
*
this
,
unsigned
short
*
ptr
,
size_t
size
)
unsigned
short
*
ptr
,
MSVCP_
size_t
size
)
{
MSVCRT_operator_delete
(
ptr
);
}
...
...
@@ -269,7 +269,7 @@ void __thiscall MSVCP_allocator_short_deallocate(void *this,
/* ?allocate@?$allocator@G@std@@QEAAPEAG_K@Z */
DEFINE_THISCALL_WRAPPER
(
MSVCP_allocator_short_allocate
,
8
)
unsigned
short
*
__thiscall
MSVCP_allocator_short_allocate
(
void
*
this
,
size_t
count
)
void
*
this
,
MSVCP_
size_t
count
)
{
if
(
UINT_MAX
/
count
<
sizeof
(
unsigned
short
))
{
throw_exception
(
EXCEPTION_BAD_ALLOC
,
NULL
);
...
...
@@ -283,7 +283,7 @@ unsigned short* __thiscall MSVCP_allocator_short_allocate(
/* ?allocate@?$allocator@G@std@@QEAAPEAG_KPEBX@Z */
DEFINE_THISCALL_WRAPPER
(
MSVCP_allocator_short_allocate_hint
,
12
)
unsigned
short
*
__thiscall
MSVCP_allocator_short_allocate_hint
(
void
*
this
,
size_t
count
,
const
void
*
hint
)
void
*
this
,
MSVCP_
size_t
count
,
const
void
*
hint
)
{
return
MSVCP_allocator_short_allocate
(
this
,
count
);
}
...
...
@@ -300,14 +300,14 @@ void __thiscall MSVCP_allocator_short_construct(void *this,
/* ?destroy@?$allocator@G@std@@QAEXPAG@Z */
/* ?destroy@?$allocator@G@std@@QEAAXPEAG@Z */
DEFINE_THISCALL_WRAPPER
(
MSVCP_allocator_short_destroy
,
8
)
void
__thiscall
MSVCP_allocator_short_destroy
(
void
*
this
,
size_t
*
ptr
)
void
__thiscall
MSVCP_allocator_short_destroy
(
void
*
this
,
MSVCP_
size_t
*
ptr
)
{
}
/* ?max_size@?$allocator@G@std@@QBEIXZ */
/* ?max_size@?$allocator@G@std@@QEBA_KXZ */
DEFINE_THISCALL_WRAPPER
(
MSVCP_allocator_short_max_size
,
4
)
size_t
__thiscall
MSVCP_allocator_short_max_size
(
void
*
this
)
MSVCP_
size_t
__thiscall
MSVCP_allocator_short_max_size
(
void
*
this
)
{
return
UINT_MAX
/
sizeof
(
unsigned
short
);
}
...
...
dlls/msvcp90/msvcp90.h
View file @
cfad9c3d
...
...
@@ -21,11 +21,12 @@
typedef
unsigned
char
MSVCP_bool
;
typedef
int
MSVCP_long
;
typedef
SIZE_T
MSVCP_size_t
;
void
__cdecl
_invalid_parameter
(
const
wchar_t
*
,
const
wchar_t
*
,
const
wchar_t
*
,
unsigned
int
,
uintptr_t
);
extern
void
*
(
__cdecl
*
MSVCRT_operator_new
)(
size_t
);
extern
void
*
(
__cdecl
*
MSVCRT_operator_new
)(
MSVCP_
size_t
);
extern
void
(
__cdecl
*
MSVCRT_operator_delete
)(
void
*
);
/* Copied from dlls/msvcrt/cpp.c */
...
...
@@ -150,8 +151,8 @@ typedef struct _basic_string_char
char
buf
[
BUF_SIZE_CHAR
];
char
*
ptr
;
}
data
;
size_t
size
;
size_t
res
;
MSVCP_
size_t
size
;
MSVCP_
size_t
res
;
}
basic_string_char
;
basic_string_char
*
__stdcall
MSVCP_basic_string_char_ctor_cstr
(
basic_string_char
*
,
const
char
*
);
...
...
@@ -167,14 +168,14 @@ typedef struct _basic_string_wchar
wchar_t
buf
[
BUF_SIZE_WCHAR
];
wchar_t
*
ptr
;
}
data
;
size_t
size
;
size_t
res
;
MSVCP_
size_t
size
;
MSVCP_
size_t
res
;
}
basic_string_wchar
;
char
*
__stdcall
MSVCP_allocator_char_allocate
(
void
*
,
size_t
);
void
__stdcall
MSVCP_allocator_char_deallocate
(
void
*
,
char
*
,
size_t
);
wchar_t
*
__stdcall
MSVCP_allocator_wchar_allocate
(
void
*
,
size_t
);
void
__stdcall
MSVCP_allocator_wchar_deallocate
(
void
*
,
wchar_t
*
,
size_t
);
char
*
__stdcall
MSVCP_allocator_char_allocate
(
void
*
,
MSVCP_
size_t
);
void
__stdcall
MSVCP_allocator_char_deallocate
(
void
*
,
char
*
,
MSVCP_
size_t
);
wchar_t
*
__stdcall
MSVCP_allocator_wchar_allocate
(
void
*
,
MSVCP_
size_t
);
void
__stdcall
MSVCP_allocator_wchar_deallocate
(
void
*
,
wchar_t
*
,
MSVCP_
size_t
);
/* class locale */
typedef
struct
...
...
dlls/msvcp90/msvcp90_main.c
View file @
cfad9c3d
...
...
@@ -28,7 +28,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
msvcp90
);
void
*
(
__cdecl
*
MSVCRT_operator_new
)(
size_t
);
void
*
(
__cdecl
*
MSVCRT_operator_new
)(
MSVCP_
size_t
);
void
(
__cdecl
*
MSVCRT_operator_delete
)(
void
*
);
static
void
init_cxx_funcs
(
void
)
{
...
...
dlls/msvcp90/string.c
View file @
cfad9c3d
This diff is collapsed.
Click to expand it.
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