Commit 0237785d authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp90: Remove MSVCP_size_t type.

parent fa272ada
......@@ -68,7 +68,7 @@ void* __thiscall MSVCP_allocator_char_assign(void *this, const 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, MSVCP_size_t size)
void __thiscall MSVCP_allocator_char_deallocate(void *this, char *ptr, size_t size)
{
MSVCRT_operator_delete(ptr);
}
......@@ -76,7 +76,7 @@ void __thiscall MSVCP_allocator_char_deallocate(void *this, char *ptr, MSVCP_siz
/* ?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, MSVCP_size_t count)
char* __thiscall MSVCP_allocator_char_allocate(void *this, size_t count)
{
return MSVCRT_operator_new(count);
}
......@@ -85,7 +85,7 @@ char* __thiscall MSVCP_allocator_char_allocate(void *this, MSVCP_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,
MSVCP_size_t count, const void *hint)
size_t count, const void *hint)
{
/* Native ignores hint */
return MSVCP_allocator_char_allocate(this, count);
......@@ -109,7 +109,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)
MSVCP_size_t __thiscall MSVCP_allocator_char_max_size(const void *this)
size_t __thiscall MSVCP_allocator_char_max_size(const void *this)
{
return UINT_MAX/sizeof(char);
}
......@@ -160,7 +160,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, MSVCP_size_t size)
wchar_t *ptr, size_t size)
{
MSVCRT_operator_delete(ptr);
}
......@@ -168,7 +168,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, MSVCP_size_t count)
wchar_t* __thiscall MSVCP_allocator_wchar_allocate(void *this, size_t count)
{
if(UINT_MAX/count < sizeof(wchar_t)) {
throw_exception(EXCEPTION_BAD_ALLOC, NULL);
......@@ -182,7 +182,7 @@ wchar_t* __thiscall MSVCP_allocator_wchar_allocate(void *this, MSVCP_size_t coun
/* ?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,
MSVCP_size_t count, const void *hint)
size_t count, const void *hint)
{
return MSVCP_allocator_wchar_allocate(this, count);
}
......@@ -206,7 +206,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)
MSVCP_size_t __thiscall MSVCP_allocator_wchar_max_size(const void *this)
size_t __thiscall MSVCP_allocator_wchar_max_size(const void *this)
{
return UINT_MAX/sizeof(wchar_t);
}
......@@ -258,7 +258,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, MSVCP_size_t size)
unsigned short *ptr, size_t size)
{
MSVCRT_operator_delete(ptr);
}
......@@ -267,7 +267,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, MSVCP_size_t count)
void *this, size_t count)
{
if(UINT_MAX/count < sizeof(unsigned short)) {
throw_exception(EXCEPTION_BAD_ALLOC, NULL);
......@@ -281,7 +281,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, MSVCP_size_t count, const void *hint)
void *this, size_t count, const void *hint)
{
return MSVCP_allocator_short_allocate(this, count);
}
......@@ -298,14 +298,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, MSVCP_size_t *ptr)
void __thiscall MSVCP_allocator_short_destroy(void *this, 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)
MSVCP_size_t __thiscall MSVCP_allocator_short_max_size(void *this)
size_t __thiscall MSVCP_allocator_short_max_size(void *this)
{
return UINT_MAX/sizeof(unsigned short);
}
......
......@@ -24,9 +24,8 @@
#define ALIGNED_SIZE(size, alignment) (((size)+((alignment)-1))/(alignment)*(alignment))
typedef unsigned char MSVCP_bool;
typedef SIZE_T MSVCP_size_t;
#define MSVCP_SIZE_T_MAX (~(MSVCP_size_t)0)
#define MSVCP_SIZE_T_MAX (~(size_t)0)
#if _MSVCP_VER >= 100
typedef __int64 DECLSPEC_ALIGN(8) streamoff;
typedef __int64 DECLSPEC_ALIGN(8) streamsize;
......@@ -43,7 +42,7 @@ void __cdecl _invalid_parameter_noinfo(void);
BOOL __cdecl __uncaught_exception(void);
int __cdecl _callnewh(size_t);
extern void* (__cdecl *MSVCRT_operator_new)(MSVCP_size_t);
extern void* (__cdecl *MSVCRT_operator_new)(size_t);
extern void (__cdecl *MSVCRT_operator_delete)(void*);
extern void* (__cdecl *MSVCRT_set_new_handler)(void*);
......@@ -89,8 +88,8 @@ typedef struct
#endif
char *ptr;
} data;
MSVCP_size_t size;
MSVCP_size_t res;
size_t size;
size_t res;
#if _MSVCP_VER == 100
char allocator;
#endif
......@@ -98,13 +97,13 @@ typedef struct
basic_string_char* __thiscall MSVCP_basic_string_char_ctor(basic_string_char*);
basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr(basic_string_char*, const char*);
basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len(basic_string_char*, const char*, MSVCP_size_t);
basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len(basic_string_char*, const char*, size_t);
basic_string_char* __thiscall MSVCP_basic_string_char_copy_ctor(basic_string_char*, const basic_string_char*);
void* __thiscall MSVCP_basic_string_char_dtor(basic_string_char*);
const char* __thiscall MSVCP_basic_string_char_c_str(const basic_string_char*);
void __thiscall MSVCP_basic_string_char_clear(basic_string_char*);
basic_string_char* __thiscall MSVCP_basic_string_char_append_ch(basic_string_char*, char);
MSVCP_size_t __thiscall MSVCP_basic_string_char_length(const basic_string_char*);
size_t __thiscall MSVCP_basic_string_char_length(const basic_string_char*);
basic_string_char* __thiscall MSVCP_basic_string_char_assign(basic_string_char*, const basic_string_char*);
typedef struct
......@@ -119,8 +118,8 @@ typedef struct
#endif
wchar_t *ptr;
} data;
MSVCP_size_t size;
MSVCP_size_t res;
size_t size;
size_t res;
#if _MSVCP_VER == 100
char allocator;
#endif
......@@ -128,19 +127,19 @@ typedef struct
basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor(basic_string_wchar*);
basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr(basic_string_wchar*, const wchar_t*);
basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len(basic_string_wchar*, const wchar_t*, MSVCP_size_t);
basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len(basic_string_wchar*, const wchar_t*, size_t);
void* __thiscall MSVCP_basic_string_wchar_dtor(basic_string_wchar*);
const wchar_t* __thiscall MSVCP_basic_string_wchar_c_str(const basic_string_wchar*);
void __thiscall MSVCP_basic_string_wchar_clear(basic_string_wchar*);
basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_ch(basic_string_wchar*, wchar_t);
MSVCP_size_t __thiscall MSVCP_basic_string_wchar_length(const basic_string_wchar*);
size_t __thiscall MSVCP_basic_string_wchar_length(const basic_string_wchar*);
char* __thiscall MSVCP_allocator_char_allocate(void*, MSVCP_size_t);
void __thiscall MSVCP_allocator_char_deallocate(void*, char*, MSVCP_size_t);
MSVCP_size_t __thiscall MSVCP_allocator_char_max_size(const void*);
wchar_t* __thiscall MSVCP_allocator_wchar_allocate(void*, MSVCP_size_t);
void __thiscall MSVCP_allocator_wchar_deallocate(void*, wchar_t*, MSVCP_size_t);
MSVCP_size_t __thiscall MSVCP_allocator_wchar_max_size(const void*);
char* __thiscall MSVCP_allocator_char_allocate(void*, size_t);
void __thiscall MSVCP_allocator_char_deallocate(void*, char*, size_t);
size_t __thiscall MSVCP_allocator_char_max_size(const void*);
wchar_t* __thiscall MSVCP_allocator_wchar_allocate(void*, size_t);
void __thiscall MSVCP_allocator_wchar_deallocate(void*, wchar_t*, size_t);
size_t __thiscall MSVCP_allocator_wchar_max_size(const void*);
typedef struct
{
......@@ -169,7 +168,7 @@ _Yarn_wchar* __thiscall _Yarn_wchar_op_assign_cstr(_Yarn_wchar*, const wchar_t*)
/* class locale::facet */
typedef struct {
const vtable_ptr *vtable;
MSVCP_size_t refs;
size_t refs;
} locale_facet;
typedef enum {
......@@ -404,9 +403,9 @@ typedef struct _fnarray {
typedef struct _ios_base {
const vtable_ptr *vtable;
#if _MSVCP_VER >= 100
MSVCP_size_t DECLSPEC_ALIGN(8) stdstr;
size_t DECLSPEC_ALIGN(8) stdstr;
#elif _MSVCP_VER >= 71
MSVCP_size_t stdstr;
size_t stdstr;
#endif
IOSB_iostate state;
IOSB_iostate except;
......@@ -421,7 +420,7 @@ typedef struct _ios_base {
locale *loc;
#endif
#if _MSVCP_VER <= 70
MSVCP_size_t stdstr;
size_t stdstr;
#endif
} ios_base;
......
......@@ -54,7 +54,7 @@ DEFINE_VTBL_WRAPPER(56);
#endif
void* (__cdecl *MSVCRT_operator_new)(MSVCP_size_t);
void* (__cdecl *MSVCRT_operator_new)(size_t);
void (__cdecl *MSVCRT_operator_delete)(void*);
void* (__cdecl *MSVCRT_set_new_handler)(void*);
......@@ -79,7 +79,7 @@ MSVCP_bool (__cdecl *Context_IsCurrentTaskCollectionCanceling)(void);
#endif
#if _MSVCP_VER >= 140
static void* __cdecl operator_new(MSVCP_size_t size)
static void* __cdecl operator_new(size_t size)
{
void *retval;
int freed;
......@@ -89,13 +89,13 @@ static void* __cdecl operator_new(MSVCP_size_t size)
retval = malloc(size);
if (retval)
{
TRACE("(%ld) returning %p\n", size, retval);
TRACE("(%Iu) returning %p\n", size, retval);
return retval;
}
freed = _callnewh(size);
} while (freed);
TRACE("(%ld) out of memory\n", size);
TRACE("(%Iu) out of memory\n", size);
throw_exception(EXCEPTION_BAD_ALLOC, "bad allocation");
return NULL;
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment