Commit d91b71e0 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcr90: Added _encoded_null() implementation.

parent c452249e
......@@ -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
......
......@@ -67,6 +67,16 @@ void * CDECL MSVCR90_encode_pointer(void * ptr)
}
/*********************************************************************
* _encoded_null (MSVCR90.@)
*/
void * CDECL _encoded_null(void)
{
TRACE("\n");
return MSVCR90_encode_pointer(NULL);
}
/*********************************************************************
* _initterm_e (MSVCR90.@)
*
* call an array of application initialization functions and report the return value
......
......@@ -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
......
......@@ -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();
......
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