|
|
@ -45,8 +45,18 @@ void ares_free_data(void *dataptr) |
|
|
|
if (!dataptr) |
|
|
|
if (!dataptr) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __INTEL_COMPILER |
|
|
|
|
|
|
|
# pragma warning(push) |
|
|
|
|
|
|
|
# pragma warning(disable:1684) |
|
|
|
|
|
|
|
/* 1684: conversion from pointer to same-sized integral type */ |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
ptr = (void *)((char *)dataptr - offsetof(struct ares_data, data)); |
|
|
|
ptr = (void *)((char *)dataptr - offsetof(struct ares_data, data)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __INTEL_COMPILER |
|
|
|
|
|
|
|
# pragma warning(pop) |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
if (ptr->mark != ARES_DATATYPE_MARK) |
|
|
|
if (ptr->mark != ARES_DATATYPE_MARK) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
@ -134,8 +144,18 @@ ares_datatype ares_get_datatype(void * dataptr) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct ares_data *ptr; |
|
|
|
struct ares_data *ptr; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __INTEL_COMPILER |
|
|
|
|
|
|
|
# pragma warning(push) |
|
|
|
|
|
|
|
# pragma warning(disable:1684) |
|
|
|
|
|
|
|
/* 1684: conversion from pointer to same-sized integral type */ |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
ptr = (void *)((char *)dataptr - offsetof(struct ares_data, data)); |
|
|
|
ptr = (void *)((char *)dataptr - offsetof(struct ares_data, data)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __INTEL_COMPILER |
|
|
|
|
|
|
|
# pragma warning(pop) |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
if (ptr->mark == ARES_DATATYPE_MARK) |
|
|
|
if (ptr->mark == ARES_DATATYPE_MARK) |
|
|
|
return ptr->type; |
|
|
|
return ptr->type; |
|
|
|
|
|
|
|
|
|
|
|