Navigation


Changeset 907:b772af200865 in freeDiameter for libfdproto


Ignore:
Timestamp:
Dec 20, 2012, 7:55:22 AM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Add a few const declaration so that C++ is less picky

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdproto/dictionary.c

    r906 r907  
    156156
    157157/* Forward declarations of search functions */
    158 static int search_vendor        ( struct dictionary * dict, int criteria, void * what, struct dict_object **result );
    159 static int search_application   ( struct dictionary * dict, int criteria, void * what, struct dict_object **result );
    160 static int search_type          ( struct dictionary * dict, int criteria, void * what, struct dict_object **result );
    161 static int search_enumval       ( struct dictionary * dict, int criteria, void * what, struct dict_object **result );
    162 static int search_avp           ( struct dictionary * dict, int criteria, void * what, struct dict_object **result );
    163 static int search_cmd           ( struct dictionary * dict, int criteria, void * what, struct dict_object **result );
    164 static int search_rule          ( struct dictionary * dict, int criteria, void * what, struct dict_object **result );
     158static int search_vendor        ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result );
     159static int search_application   ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result );
     160static int search_type          ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result );
     161static int search_enumval       ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result );
     162static int search_avp           ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result );
     163static int search_cmd           ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result );
     164static int search_rule          ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result );
    165165
    166166/* The following array contains lot of data about the different types of objects, for automated handling */
     
    173173        int                     eyecatcher;     /* A kind of signature for this object */
    174174        void                  (*dump_data)(void * data );       /* The function to dump the data section */
    175         int                   (*search_fct)(struct dictionary * dict, int criteria, void * what, struct dict_object **result );;        /* The function to search an object of this type */
     175        int                   (*search_fct)(struct dictionary * dict, int criteria, const void * what, struct dict_object **result );;  /* The function to search an object of this type */
    176176        int                     haslist[NB_LISTS_PER_OBJ];      /* Tell if this list is used */
    177177} dict_obj_info[] = { { 0, "(error)", 0, 0, 0, 0, NULL, NULL, {0, 0, 0} }
     
    724724}
    725725
    726 static int search_vendor ( struct dictionary * dict, int criteria, void * what, struct dict_object **result )
     726static int search_vendor ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result )
    727727{
    728728        int ret = 0;
     
    755755}
    756756
    757 static int search_application ( struct dictionary * dict, int criteria, void * what, struct dict_object **result )
     757static int search_application ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result )
    758758{
    759759        int ret = 0;
     
    792792}
    793793
    794 static int search_type ( struct dictionary * dict, int criteria, void * what, struct dict_object **result )
     794static int search_type ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result )
    795795{
    796796        int ret = 0;
     
    823823}
    824824
    825 static int search_enumval ( struct dictionary * dict, int criteria, void * what, struct dict_object **result )
     825static int search_enumval ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result )
    826826{
    827827        int ret = 0;
     
    928928}
    929929
    930 static int search_avp ( struct dictionary * dict, int criteria, void * what, struct dict_object **result )
     930static int search_avp ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result )
    931931{
    932932        int ret = 0;
     
    10371037}
    10381038
    1039 static int search_cmd ( struct dictionary * dict, int criteria, void * what, struct dict_object **result )
     1039static int search_cmd ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result )
    10401040{
    10411041        int ret = 0;
     
    11101110}
    11111111
    1112 static int search_rule ( struct dictionary * dict, int criteria, void * what, struct dict_object **result )
     1112static int search_rule ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result )
    11131113{
    11141114        int ret = 0;
     
    19231923
    19241924
    1925 int fd_dict_search ( struct dictionary * dict, enum dict_object_type type, int criteria, void * what, struct dict_object **result, int retval )
     1925int fd_dict_search ( struct dictionary * dict, enum dict_object_type type, int criteria, const void * what, struct dict_object **result, int retval )
    19261926{
    19271927        int ret = 0;
Note: See TracChangeset for help on using the changeset viewer.