summaryrefslogtreecommitdiff
path: root/source4/heimdal/base/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal/base/string.c')
-rw-r--r--source4/heimdal/base/string.c33
1 files changed, 1 insertions, 32 deletions
diff --git a/source4/heimdal/base/string.c b/source4/heimdal/base/string.c
index 414a9161fa..11e8841153 100644
--- a/source4/heimdal/base/string.c
+++ b/source4/heimdal/base/string.c
@@ -44,31 +44,20 @@ string_dealloc(void *ptr)
static int
string_cmp(void *a, void *b)
{
- if (heim_base_is_tagged_string(a))
- a = heim_base_tagged_string_ptr(a);
- if (heim_base_is_tagged_string(b))
- b = heim_base_tagged_string_ptr(b);
-
return strcmp(a, b);
}
static unsigned long
string_hash(void *ptr)
{
- const char *s;
+ const char *s = ptr;
unsigned long n;
- if (heim_base_is_tagged_string(ptr))
- s = heim_base_tagged_string_ptr(ptr);
- else
- s = ptr;
-
for (n = 0; *s; ++s)
n += *s;
return n;
}
-
struct heim_type_data _heim_string_object = {
HEIM_TID_STRING,
"string-object",
@@ -100,26 +89,6 @@ heim_string_create(const char *string)
}
/**
- * Create a string object from a strings allocated in the text segment.
- *
- * Note that static string object wont be auto released with
- * heim_auto_release(), the allocation policy of the string must
- * be manged separately from the returned object. This make this
- * function not very useful for strings in allocated from heap or
- * stack. In that case you should use heim_string_create().
- *
- * @param string the string to create, must be an utf8 string
- *
- * @return string object
- */
-
-heim_string_t
-heim_string_create_with_static(const char *string)
-{
- return heim_base_make_tagged_string_ptr(string);
-}
-
-/**
* Return the type ID of string objects
*
* @return type id of string objects