Constification of LHASH. Contributed by "Paul D. Smith" <psmith@gnu.org>
authorRichard Levitte <levitte@openssl.org>
Tue, 7 Nov 2000 23:43:21 +0000 (23:43 +0000)
committerRichard Levitte <levitte@openssl.org>
Tue, 7 Nov 2000 23:43:21 +0000 (23:43 +0000)
I didn't apply all his patches yet, since I have some hesitance about
unconstifying.  To be pondered.

crypto/lhash/lh_stats.c
crypto/lhash/lhash.c
crypto/lhash/lhash.h

index ee0600060e07901d00fa42bcde325d25a763dcd6..62dab3acc9c0371d7e68e0c2c9e72589e18feb13 100644 (file)
@@ -139,7 +139,7 @@ void lh_node_usage_stats(LHASH *lh, FILE *out)
 #else
 
 #ifndef NO_FP_API
 #else
 
 #ifndef NO_FP_API
-void lh_stats(LHASH *lh, FILE *fp)
+void lh_stats(const LHASH *lh, FILE *fp)
        {
        BIO *bp;
 
        {
        BIO *bp;
 
@@ -151,7 +151,7 @@ void lh_stats(LHASH *lh, FILE *fp)
 end:;
        }
 
 end:;
        }
 
-void lh_node_stats(LHASH *lh, FILE *fp)
+void lh_node_stats(const LHASH *lh, FILE *fp)
        {
        BIO *bp;
 
        {
        BIO *bp;
 
@@ -163,7 +163,7 @@ void lh_node_stats(LHASH *lh, FILE *fp)
 end:;
        }
 
 end:;
        }
 
-void lh_node_usage_stats(LHASH *lh, FILE *fp)
+void lh_node_usage_stats(const LHASH *lh, FILE *fp)
        {
        BIO *bp;
 
        {
        BIO *bp;
 
@@ -177,7 +177,7 @@ end:;
 
 #endif
 
 
 #endif
 
-void lh_stats_bio(LHASH *lh, BIO *out)
+void lh_stats_bio(const LHASH *lh, BIO *out)
        {
        char buf[128];
 
        {
        char buf[128];
 
@@ -225,7 +225,7 @@ void lh_stats_bio(LHASH *lh, BIO *out)
 #endif
        }
 
 #endif
        }
 
-void lh_node_stats_bio(LHASH *lh, BIO *out)
+void lh_node_stats_bio(const LHASH *lh, BIO *out)
        {
        LHASH_NODE *n;
        unsigned int i,num;
        {
        LHASH_NODE *n;
        unsigned int i,num;
@@ -240,7 +240,7 @@ void lh_node_stats_bio(LHASH *lh, BIO *out)
                }
        }
 
                }
        }
 
-void lh_node_usage_stats_bio(LHASH *lh, BIO *out)
+void lh_node_usage_stats_bio(const LHASH *lh, BIO *out)
        {
        LHASH_NODE *n;
        unsigned long num;
        {
        LHASH_NODE *n;
        unsigned long num;
index 7da14620a478fd2074ca53d3c05c35b2fd8b658d..cdcc3b6e4d04aafd153db72bf63fd67312830d2d 100644 (file)
@@ -455,7 +455,7 @@ unsigned long lh_strhash(const char *c)
        return((ret>>16)^ret);
        }
 
        return((ret>>16)^ret);
        }
 
-unsigned long lh_num_items(LHASH *lh)
+unsigned long lh_num_items(const LHASH *lh)
        {
        return lh ? lh->num_items : 0;
        }
        {
        return lh ? lh->num_items : 0;
        }
index b8ff021906975180902c4719e4d9dbca226d1890..28e8f1ef0a921ca722ff8e05563598e7e2647d61 100644 (file)
@@ -128,18 +128,18 @@ void *lh_retrieve(LHASH *lh, void *data);
     void lh_doall(LHASH *lh, void (*func)(/*void *b*/));
 void lh_doall_arg(LHASH *lh, void (*func)(/*void *a,void *b*/),void *arg);
 unsigned long lh_strhash(const char *c);
     void lh_doall(LHASH *lh, void (*func)(/*void *b*/));
 void lh_doall_arg(LHASH *lh, void (*func)(/*void *a,void *b*/),void *arg);
 unsigned long lh_strhash(const char *c);
-unsigned long lh_num_items(LHASH *lh);
+unsigned long lh_num_items(const LHASH *lh);
 
 #ifndef NO_FP_API
 
 #ifndef NO_FP_API
-void lh_stats(LHASH *lh, FILE *out);
-void lh_node_stats(LHASH *lh, FILE *out);
-void lh_node_usage_stats(LHASH *lh, FILE *out);
+void lh_stats(const LHASH *lh, FILE *out);
+void lh_node_stats(const LHASH *lh, FILE *out);
+void lh_node_usage_stats(const LHASH *lh, FILE *out);
 #endif
 
 #ifndef NO_BIO
 #endif
 
 #ifndef NO_BIO
-void lh_stats_bio(LHASH *lh, BIO *out);
-void lh_node_stats_bio(LHASH *lh, BIO *out);
-void lh_node_usage_stats_bio(LHASH *lh, BIO *out);
+void lh_stats_bio(const LHASH *lh, BIO *out);
+void lh_node_stats_bio(const LHASH *lh, BIO *out);
+void lh_node_usage_stats_bio(const LHASH *lh, BIO *out);
 #endif
 #ifdef  __cplusplus
 }
 #endif
 #ifdef  __cplusplus
 }