summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2013-02-13 14:40:00 +0100
committerDaniel Stenberg <daniel@haxx.se>2013-02-13 14:58:04 +0100
commit050663271eb699f9366bdc5f6664e8aeeb2c92d2 (patch)
tree422096dd0fc10bd754467851b9c474dd9d805569
parent2a3a63ae1f0894fd33db0c30c75fb2f771d8e7fc (diff)
downloadc-ares-050663271eb699f9366bdc5f6664e8aeeb2c92d2.tar.gz
c-ares-050663271eb699f9366bdc5f6664e8aeeb2c92d2.tar.bz2
c-ares-050663271eb699f9366bdc5f6664e8aeeb2c92d2.zip
ares_get_datatype: removed unused function
it was also wrongly named as internal functions require two underscores
-rw-r--r--ares_data.c32
-rw-r--r--ares_data.h3
2 files changed, 2 insertions, 33 deletions
diff --git a/ares_data.c b/ares_data.c
index 7c04650..b86ca90 100644
--- a/ares_data.c
+++ b/ares_data.c
@@ -1,5 +1,5 @@
-/* Copyright (C) 2009-2012 by Daniel Stenberg
+/* Copyright (C) 2009-2013 by Daniel Stenberg
*
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
@@ -199,33 +199,3 @@ void *ares_malloc_data(ares_datatype type)
return &ptr->data;
}
-
-
-/*
-** ares_get_datatype() - c-ares internal helper function.
-**
-** This function returns the ares_datatype of the data stored in a
-** private ares_data struct when given the public API pointer.
-*/
-
-ares_datatype ares_get_datatype(void * dataptr)
-{
- 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));
-
-#ifdef __INTEL_COMPILER
-# pragma warning(pop)
-#endif
-
- if (ptr->mark == ARES_DATATYPE_MARK)
- return ptr->type;
-
- return ARES_DATATYPE_UNKNOWN;
-}
diff --git a/ares_data.h b/ares_data.h
index 8974295..12e3b67 100644
--- a/ares_data.h
+++ b/ares_data.h
@@ -1,5 +1,5 @@
-/* Copyright (C) 2009-2012 by Daniel Stenberg
+/* Copyright (C) 2009-2013 by Daniel Stenberg
*
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
@@ -66,4 +66,3 @@ struct ares_data {
void *ares_malloc_data(ares_datatype type);
-ares_datatype ares_get_datatype(void * dataptr);