[PATCH] wdscore: Implement CurrentIP.
Zebediah Figura (she/her)
zfigura at codeweavers.com
Wed Jan 12 10:14:11 CST 2022
On 1/12/22 10:00, Zebediah Figura (she/her) wrote:
> Hello Mohammed, thanks for the patch! I have a few comments inlined below.
>
> On 1/12/22 05:03, Mohamad Al-Jaf wrote:
>> +#include <stdarg.h>
>> +#include <stdint.h>
>> +
>> +#include "windef.h"
>> +#include "winbase.h"
>> +
>> +#include "wine/asm.h"
>> +#include "wine/debug.h"
>> +
>> +WINE_DEFAULT_DEBUG_CHANNEL(wdscore);
>
> This debug channel is unused, and should generate a warning.
>
>> +
>> +uint32_t get_ip();
>> +__ASM_GLOBAL_FUNC( get_ip,
>> + "mov 0(%esp), %eax\n\t"
>> + "ret\n\t" )
>
> No reason to make this a separate function; you can use
> __ASM_STDCALL_FUNC() to declare it.
Giovanni points out that this also won't compile on anything other than
i386. You'll need to use #ifdef guards to handle separate architectures.
>
>> +
>> +
>> +/***********************************************************************
>> + * CurrentIP (wdscore.@)
>> + */
>> +int WINAPI CurrentIP()
>> +{
>> + uint32_t ip;
>> +
>> + ip = get_ip();
>> + return ip;
>> +}
>> \ No newline at end of file
>
> Please try to avoid whitespace errors.
>
More information about the wine-devel
mailing list