Browse Source

uthash: Eliminate HASH_DEFINE_OWN_STDINT

This macro was introduced in 15ad0427 for the benefit of people
who were relying on "uthash.h" to define its own `uint8_t` and
`uint32_t` typedefs, instead of either (1) getting them from the
Standard Library or (2) getting them from the user-programmer
somehow (e.g. `typedef char uint8_t` before including "uthash.h").
I see two projects using `HASH_NO_STDINT`, but zero projects
using `HASH_DEFINE_OWN_STDINT`, and somehow five years have passed;
it's time to kill off `HASH_DEFINE_OWN_STDINT`.
Arthur O'Dwyer 7 months ago
parent
commit
2f165f5d8f
1 changed files with 3 additions and 6 deletions
  1. 3 6
      src/uthash.h

+ 3 - 6
src/uthash.h

@@ -30,12 +30,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <stddef.h>   /* ptrdiff_t */
 #include <stdlib.h>   /* exit */
 
-#if defined(HASH_DEFINE_OWN_STDINT) && HASH_DEFINE_OWN_STDINT
-/* This codepath is provided for backward compatibility, but I plan to remove it. */
-#warning "HASH_DEFINE_OWN_STDINT is deprecated; please use HASH_NO_STDINT instead"
-typedef unsigned int uint32_t;
-typedef unsigned char uint8_t;
-#elif defined(HASH_NO_STDINT) && HASH_NO_STDINT
+#if defined(HASH_NO_STDINT) && HASH_NO_STDINT
+/* The user doesn't have <stdint.h>, and must figure out their own way
+   to provide definitions for uint8_t and uint32_t. */
 #else
 #include <stdint.h>   /* uint8_t, uint32_t */
 #endif