msvcr90: Added _encoded_null() implementation.

This commit is contained in:
Piotr Caban 2010-03-25 11:09:13 +01:00 committed by Alexandre Julliard
parent c452249e00
commit d91b71e0df
4 changed files with 19 additions and 4 deletions

View File

@ -371,7 +371,7 @@
@ cdecl _ecvt(double long ptr ptr) msvcrt._ecvt
@ stub _ecvt_s
@ cdecl _encode_pointer(ptr) msvcr90._encode_pointer
@ stub _encoded_null
@ cdecl _encoded_null() msvcr90._encoded_null
@ cdecl _endthread() msvcrt._endthread
@ cdecl _endthreadex(long) msvcrt._endthreadex
@ extern _environ msvcrt._environ

View File

@ -66,6 +66,16 @@ void * CDECL MSVCR90_encode_pointer(void * ptr)
return EncodePointer(ptr);
}
/*********************************************************************
* _encoded_null (MSVCR90.@)
*/
void * CDECL _encoded_null(void)
{
TRACE("\n");
return MSVCR90_encode_pointer(NULL);
}
/*********************************************************************
* _initterm_e (MSVCR90.@)
*

View File

@ -363,7 +363,7 @@
@ cdecl _ecvt(double long ptr ptr) msvcrt._ecvt
@ stub _ecvt_s
@ cdecl _encode_pointer(ptr) MSVCR90_encode_pointer
@ stub _encoded_null
@ cdecl _encoded_null()
@ cdecl _endthread() msvcrt._endthread
@ cdecl _endthreadex(long) msvcrt._endthreadex
@ extern _environ msvcrt._environ

View File

@ -29,6 +29,8 @@ typedef int (__cdecl *_INITTERM_E_FN)(void);
static int (__cdecl *p_initterm_e)(_INITTERM_E_FN *table, _INITTERM_E_FN *end);
static void* (__cdecl *p_encode_pointer)(void *);
static void* (__cdecl *p_decode_pointer)(void *);
static void* (__cdecl *p_encoded_null)(void);
int cb_called[4];
/* ########## */
@ -136,8 +138,8 @@ static void test__encode_pointer(void)
{
void *ptr, *res;
if(!p_encode_pointer || !p_decode_pointer) {
win_skip("_encode_pointer or _decode_pointer not found\n");
if(!p_encode_pointer || !p_decode_pointer || !p_encoded_null) {
win_skip("_encode_pointer, _decode_pointer or _encoded_null not found\n");
return;
}
@ -150,6 +152,8 @@ static void test__encode_pointer(void)
res = EncodePointer(p_encode_pointer);
ok(ptr == res, "_encode_pointer produced different result than EncodePointer\n");
ok(p_decode_pointer(ptr) == p_encode_pointer, "Error decoding pointer\n");
ok(p_encoded_null() == p_encode_pointer(NULL), "Error encoding null\n");
}
/* ########## */
@ -168,6 +172,7 @@ START_TEST(msvcr90)
p_initterm_e = (void *) GetProcAddress(hcrt, "_initterm_e");
p_encode_pointer = (void *) GetProcAddress(hcrt, "_encode_pointer");
p_decode_pointer = (void *) GetProcAddress(hcrt, "_decode_pointer");
p_encoded_null = (void *) GetProcAddress(hcrt, "_encoded_null");
test__initterm_e();
test__encode_pointer();