From 7d3e2bd2c4cfd1296d1d6f996d7548de26540d41 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Fri, 15 Feb 2013 16:27:18 -0800 Subject: Sync with 8 months of Google-internal development. Many things have changed and been simplified. The memory-management story for upb_def and upb_handlers is much more robust; upb_def and upb_handlers should be fairly stable interfaces now. There is still much work to do for the runtime component (upb_sink). --- bindings/linux/string.h | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'bindings/linux/string.h') diff --git a/bindings/linux/string.h b/bindings/linux/string.h index 69de3fa..30ebf8a 100644 --- a/bindings/linux/string.h +++ b/bindings/linux/string.h @@ -9,18 +9,5 @@ #define UPB_LINUX_STRING_H_ #include -#include -#include "upb/upb.h" // For INLINE. - -INLINE char *strdup(const char *s) { - size_t len = strlen(s); - char *ret = malloc(len + 1); - if (ret == NULL) return NULL; - // Be particularly defensive and guard against buffer overflow if there - // is a concurrent mutator. - strncpy(ret, s, len); - ret[len] = '\0'; - return ret; -} #endif /* UPB_DEF_H_ */ -- cgit v1.2.3