From: Eli Zaretskii Date: Mon, 6 Jun 2005 19:28:02 +0000 (+0000) Subject: (RVA_TO_PTR): Moved here from w32heap.h. X-Git-Tag: emacs-pretest-22.0.90~9244 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e9bdb9c9f79bfb31977501ef5aebd53f1505718a;p=emacs.git (RVA_TO_PTR): Moved here from w32heap.h. --- diff --git a/src/unexw32.c b/src/unexw32.c index b1838644965..1b2dbe74c31 100644 --- a/src/unexw32.c +++ b/src/unexw32.c @@ -325,6 +325,9 @@ relocate_offset (DWORD offset, /* Convert address in executing image to RVA. */ #define PTR_TO_RVA(ptr) ((DWORD)(ptr) - (DWORD) GetModuleHandle (NULL)) +#define RVA_TO_PTR(var,section,filedata) \ + ((void *)(RVA_TO_OFFSET(var,section) + (filedata).file_base)) + #define PTR_TO_OFFSET(ptr, pfile_data) \ ((unsigned char *)(ptr) - (pfile_data)->file_base)