diff options
author | Michael Mann <mmann78@netscape.net> | 2015-01-11 21:32:53 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-01-16 15:25:18 +0000 |
commit | ada1eec702ff44dc89670a1aa25c1e34d370bebb (patch) | |
tree | cb754fdadbad9312340bbbc2e0a13d4ff71d2349 /epan/address.h | |
parent | 260b19e98d02b92afe9a1d361fa6f98b3a63efb4 (diff) |
SE_COPY_ADDRESS -> WMEM_COPY_ADDRESS
Copy addresses with wmem-scope instead of (forced) seasonal scope. All existing instances were converted to wmem_file_scope, but the flexibility is there for other scopes.
Change-Id: I8e58837b9ef574ec7dd87e278470d7063ae8c1c2
Reviewed-on: https://code.wireshark.org/review/6564
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/address.h')
-rw-r--r-- | epan/address.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/address.h b/epan/address.h index a2582f3d00..a8a4bc42ae 100644 --- a/epan/address.h +++ b/epan/address.h @@ -228,18 +228,18 @@ copy_address_shallow(address *to, const address *from) { #define COPY_ADDRESS_SHALLOW(to, from) copy_address_shallow((to), (from)) /** Copy an address, allocating a new buffer for the address data - * using seasonal memory. + * using wmem-scoped memory. * * @param to [in,out] The destination address. * @param from [in] The source address. */ -#define SE_COPY_ADDRESS(to, from) \ +#define WMEM_COPY_ADDRESS(scope, to, from) \ do { \ - void *SE_COPY_ADDRESS_data; \ + void *WMEM_COPY_ADDRESS_data; \ copy_address_shallow((to), (from)); \ - SE_COPY_ADDRESS_data = se_alloc((from)->len); \ - memcpy(SE_COPY_ADDRESS_data, (from)->data, (from)->len); \ - (to)->data = SE_COPY_ADDRESS_data; \ + WMEM_COPY_ADDRESS_data = wmem_alloc(scope, (from)->len); \ + memcpy(WMEM_COPY_ADDRESS_data, (from)->data, (from)->len); \ + (to)->data = WMEM_COPY_ADDRESS_data; \ } while (0) |