mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-04-05 20:31:00 +08:00
Change char * to const char *
This commit is contained in:
parent
0f017883f6
commit
e743949e47
@ -470,7 +470,7 @@ void mdb_free_catalog(MdbHandle *mdb);
|
||||
GPtrArray *mdb_read_catalog(MdbHandle *mdb, int obj_type);
|
||||
MdbCatalogEntry *mdb_get_catalogentry_by_name(MdbHandle *mdb, const gchar* name);
|
||||
void mdb_dump_catalog(MdbHandle *mdb, int obj_type);
|
||||
char *mdb_get_objtype_string(int obj_type);
|
||||
const char *mdb_get_objtype_string(int obj_type);
|
||||
|
||||
/* table.c */
|
||||
MdbTableDef *mdb_alloc_tabledef(MdbCatalogEntry *entry);
|
||||
|
@ -18,10 +18,10 @@
|
||||
|
||||
#include "mdbtools.h"
|
||||
|
||||
char *
|
||||
const char *
|
||||
mdb_get_objtype_string(int obj_type)
|
||||
{
|
||||
static char *type_name[] = {"Form",
|
||||
static const char *type_name[] = {"Form",
|
||||
"Table",
|
||||
"Macro",
|
||||
"System Table",
|
||||
@ -35,7 +35,7 @@ static char *type_name[] = {"Form",
|
||||
"Database"
|
||||
};
|
||||
|
||||
if (obj_type > 11) {
|
||||
if (obj_type >= (int)(sizeof(type_name)/sizeof(type_name[0]))) {
|
||||
return NULL;
|
||||
} else {
|
||||
return type_name[obj_type];
|
||||
|
Loading…
Reference in New Issue
Block a user