From: Ken Raeburn Date: Wed, 8 Jan 2003 03:51:03 +0000 (+0000) Subject: More const for ops tables X-Git-Tag: krb5-1.3-alpha1~183 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1ab164c46e3276f2b5056727f4118b17aa040c71;p=krb5.git More const for ops tables git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15094 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/ChangeLog b/src/include/ChangeLog index 93599755c..d01684e07 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -4,6 +4,7 @@ (struct krb5_rc_st): Field ops now points to const. (krb5_rc_register_type): Ops argument now points to const. (krb5_rc_dfl_ops): Now const. + (struct _krb5_ccache): Field ops now points to const. 2003-01-06 Sam Hartman diff --git a/src/include/k5-int.h b/src/include/k5-int.h index 0d98e8fa2..2bfce56e6 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -1680,7 +1680,7 @@ krb5_error_code KRB5_CALLCONV krb5int_accessor struct _krb5_ccache { krb5_magic magic; - struct _krb5_cc_ops *ops; + const struct _krb5_cc_ops *ops; krb5_pointer data; }; diff --git a/src/lib/krb5/ccache/ChangeLog b/src/lib/krb5/ccache/ChangeLog index 3fd7b3ef0..038a1ce51 100644 --- a/src/lib/krb5/ccache/ChangeLog +++ b/src/lib/krb5/ccache/ChangeLog @@ -1,5 +1,9 @@ 2003-01-07 Ken Raeburn + * cc_file.c (krb5_cc_file_ops): Now const. + * fcc.h (krb5_cc_file_ops): Update decl. + * cc_memory.c (krb5_mcc_ops): Now const. + * ccbase.c (krb5_mcc_ops): Update decl. * ccdefops.c (krb5_cc_dfl_ops): Now points to const. 2002-09-03 Ken Raeburn diff --git a/src/lib/krb5/ccache/cc_file.c b/src/lib/krb5/ccache/cc_file.c index f2ebe1555..62ca411f2 100644 --- a/src/lib/krb5/ccache/cc_file.c +++ b/src/lib/krb5/ccache/cc_file.c @@ -201,7 +201,7 @@ static krb5_error_code krb5_fcc_skip_principal static krb5_error_code KRB5_CALLCONV krb5_fcc_set_flags (krb5_context, krb5_ccache id, krb5_flags flags); -extern krb5_cc_ops krb5_cc_file_ops; +extern const krb5_cc_ops krb5_cc_file_ops; krb5_error_code krb5_change_cache (void); @@ -2458,7 +2458,7 @@ krb5_get_notification_message (void) #endif /* _WIN32 */ -krb5_cc_ops krb5_cc_file_ops = { +const krb5_cc_ops krb5_cc_file_ops = { 0, "FILE", krb5_fcc_get_name, diff --git a/src/lib/krb5/ccache/cc_memory.c b/src/lib/krb5/ccache/cc_memory.c index 99c42f578..97ec32752 100644 --- a/src/lib/krb5/ccache/cc_memory.c +++ b/src/lib/krb5/ccache/cc_memory.c @@ -80,7 +80,7 @@ krb5_error_code KRB5_CALLCONV krb5_mcc_store krb5_error_code KRB5_CALLCONV krb5_mcc_set_flags (krb5_context, krb5_ccache id , krb5_flags flags ); -extern krb5_cc_ops krb5_mcc_ops; +extern const krb5_cc_ops krb5_mcc_ops; krb5_error_code krb5_change_cache (void); #define KRB5_OK 0 @@ -538,7 +538,7 @@ krb5_mcc_set_flags(krb5_context context, krb5_ccache id, krb5_flags flags) #define NEED_WINDOWS -krb5_cc_ops krb5_mcc_ops = { +const krb5_cc_ops krb5_mcc_ops = { 0, "MEMORY", krb5_mcc_get_name, diff --git a/src/lib/krb5/ccache/ccbase.c b/src/lib/krb5/ccache/ccbase.c index c4c312b3e..ddd5e80d4 100644 --- a/src/lib/krb5/ccache/ccbase.c +++ b/src/lib/krb5/ccache/ccbase.c @@ -34,7 +34,7 @@ struct krb5_cc_typelist krb5_cc_ops *ops; struct krb5_cc_typelist *next; }; -extern krb5_cc_ops krb5_mcc_ops; +extern const krb5_cc_ops krb5_mcc_ops; static struct krb5_cc_typelist cc_entry = { &krb5_mcc_ops, NULL }; diff --git a/src/lib/krb5/ccache/fcc.h b/src/lib/krb5/ccache/fcc.h index 7f91fd846..4f8a81579 100644 --- a/src/lib/krb5/ccache/fcc.h +++ b/src/lib/krb5/ccache/fcc.h @@ -35,7 +35,7 @@ #include "k5-int.h" #include -extern krb5_cc_ops krb5_cc_file_ops; +extern const krb5_cc_ops krb5_cc_file_ops; #define KRB5_OK 0