From d3f5e39945c1adca90422be3853d860ba9478c11 Mon Sep 17 00:00:00 2001 From: Robin Barker Date: Sat, 22 Dec 2007 00:39:47 +0000 Subject: ext/ consting From: "Robin Barker" Message-ID: <46A0F33545E63740BC7563DE59CA9C6D09399D@exchsvr2.npl.ad.local> Date: Sat, 22 Dec 2007 00:39:47 -0000 p4raw-id: //depot/perl@32703 --- ext/SDBM_File/sdbm/hash.c | 2 +- ext/SDBM_File/sdbm/pair.c | 4 ++-- ext/SDBM_File/sdbm/sdbm.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'ext/SDBM_File') diff --git a/ext/SDBM_File/sdbm/hash.c b/ext/SDBM_File/sdbm/hash.c index 9b27648599..7dd1c99e35 100644 --- a/ext/SDBM_File/sdbm/hash.c +++ b/ext/SDBM_File/sdbm/hash.c @@ -18,7 +18,7 @@ * 65587 even better. */ long -sdbm_hash(register char *str, register int len) +sdbm_hash(register const char *str, register int len) { register unsigned long n = 0; diff --git a/ext/SDBM_File/sdbm/pair.c b/ext/SDBM_File/sdbm/pair.c index 4f0fde2302..42b130db19 100644 --- a/ext/SDBM_File/sdbm/pair.c +++ b/ext/SDBM_File/sdbm/pair.c @@ -22,7 +22,7 @@ /* * forward */ -static int seepair proto((char *, int, char *, int)); +static int seepair proto((char *, int, const char *, int)); /* * page format: @@ -218,7 +218,7 @@ delpair(char *pag, datum key) * return 0 if not found. */ static int -seepair(char *pag, register int n, register char *key, register int siz) +seepair(char *pag, register int n, register const char *key, register int siz) { register int i; register int off = PBLKSIZ; diff --git a/ext/SDBM_File/sdbm/sdbm.h b/ext/SDBM_File/sdbm/sdbm.h index 88e4b66b39..53fc366801 100644 --- a/ext/SDBM_File/sdbm/sdbm.h +++ b/ext/SDBM_File/sdbm/sdbm.h @@ -47,7 +47,7 @@ typedef struct { #define sdbm_pagfno(db) ((db)->pagf) typedef struct { - char *dptr; + const char *dptr; int dsize; } datum; @@ -85,7 +85,7 @@ extern int sdbm_exists proto((DBM *, datum)); * other */ extern DBM *sdbm_prep proto((char *, char *, int, int)); -extern long sdbm_hash proto((char *, int)); +extern long sdbm_hash proto((const char *, int)); #ifndef SDBM_ONLY #define dbm_open sdbm_open -- cgit v1.2.1