Massive constification.
[oweals/openssl.git] / crypto / lhash / lhash.h
index 70cbc6dfe70aca179f1a2d6fe239751b61716462..e97d39ffc51134496dda9b227125f1663fece1aa 100644 (file)
@@ -102,10 +102,16 @@ typedef struct lhash_st
        unsigned long num_retrieve;
        unsigned long num_retrieve_miss;
        unsigned long num_hash_comps;
+
+       int error;
        } LHASH;
 
 #define LH_LOAD_MULT   256
 
+/* Indicates a malloc() error in the last call, this is only bad
+ * in lh_insert(). */
+#define lh_error(lh)   ((lh)->error)
+
 #ifndef NOPROTO
 LHASH *lh_new(unsigned long (*h)(), int (*c)());
 void lh_free(LHASH *lh);
@@ -114,7 +120,7 @@ char *lh_delete(LHASH *lh, char *data);
 char *lh_retrieve(LHASH *lh, char *data);
 void lh_doall(LHASH *lh, void (*func)(/* char *b */));
 void lh_doall_arg(LHASH *lh, void (*func)(/*char *a,char *b*/),char *arg);
-unsigned long lh_strhash(char *c);
+unsigned long lh_strhash(const char *c);
 
 #ifndef NO_FP_API
 void lh_stats(LHASH *lh, FILE *out);