summaryrefslogtreecommitdiff
path: root/src/common/db.c
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-11-19 21:25:30 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-11-19 21:25:30 +0000
commitdf56992212c321b8547f2bdf1c83a48b296d629d (patch)
treeb1e33f1b70a925bef7378112b6dbf8a21712636d /src/common/db.c
parent15ec7e3b5d5221c388c4ee97ef2688820e7f9d4b (diff)
downloadhercules-df56992212c321b8547f2bdf1c83a48b296d629d.tar.gz
hercules-df56992212c321b8547f2bdf1c83a48b296d629d.tar.bz2
hercules-df56992212c321b8547f2bdf1c83a48b296d629d.tar.xz
hercules-df56992212c321b8547f2bdf1c83a48b296d629d.zip
* Various VC6-related fixes and tweaks. [Ai4rei]
- Fixed a typo in VC6 project files, that prevented login-server from compiling (bugreport:4061, since r12727). - Fixed usage of 'long long' in Sql_P_BindSqlDataType preventing SQL VC6 projects from compiling (bugreport:1741, since r10779). - Fixed usage of 'long long' in strtoull preventing VC6 projects from compiling (bugreport:4059, follow up to r14245). - Made strtoull default to base 10 and actually process base 8, to match the normal behavior of this function (bugreport:4059, follow up to r14245). - Fixed functions in db.c not being returned as pointer, causing warnings on VC6. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14466 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/db.c')
-rw-r--r--src/common/db.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/common/db.c b/src/common/db.c
index 537f26e6a..4dcf1d0b0 100644
--- a/src/common/db.c
+++ b/src/common/db.c
@@ -2229,10 +2229,10 @@ DBComparator db_default_cmp(DBType type)
{
DB_COUNTSTAT(db_default_cmp);
switch (type) {
- case DB_INT: return db_int_cmp;
- case DB_UINT: return db_uint_cmp;
- case DB_STRING: return db_string_cmp;
- case DB_ISTRING: return db_istring_cmp;
+ case DB_INT: return &db_int_cmp;
+ case DB_UINT: return &db_uint_cmp;
+ case DB_STRING: return &db_string_cmp;
+ case DB_ISTRING: return &db_istring_cmp;
default:
ShowError("db_default_cmp: Unknown database type %u\n", type);
return NULL;
@@ -2253,10 +2253,10 @@ DBHasher db_default_hash(DBType type)
{
DB_COUNTSTAT(db_default_hash);
switch (type) {
- case DB_INT: return db_int_hash;
- case DB_UINT: return db_uint_hash;
- case DB_STRING: return db_string_hash;
- case DB_ISTRING: return db_istring_hash;
+ case DB_INT: return &db_int_hash;
+ case DB_UINT: return &db_uint_hash;
+ case DB_STRING: return &db_string_hash;
+ case DB_ISTRING: return &db_istring_hash;
default:
ShowError("db_default_hash: Unknown database type %u\n", type);
return NULL;
@@ -2284,12 +2284,12 @@ DBReleaser db_default_release(DBType type, DBOptions options)
options = db_fix_options(type, options);
if (options&DB_OPT_RELEASE_DATA) { // Release data, what about the key?
if (options&(DB_OPT_DUP_KEY|DB_OPT_RELEASE_KEY))
- return db_release_both; // Release both key and data
- return db_release_data; // Only release data
+ return &db_release_both; // Release both key and data
+ return &db_release_data; // Only release data
}
if (options&(DB_OPT_DUP_KEY|DB_OPT_RELEASE_KEY))
- return db_release_key; // Only release key
- return db_release_nothing; // Release nothing
+ return &db_release_key; // Only release key
+ return &db_release_nothing; // Release nothing
}
/**
@@ -2307,10 +2307,10 @@ DBReleaser db_custom_release(DBRelease which)
{
DB_COUNTSTAT(db_custom_release);
switch (which) {
- case DB_RELEASE_NOTHING: return db_release_nothing;
- case DB_RELEASE_KEY: return db_release_key;
- case DB_RELEASE_DATA: return db_release_data;
- case DB_RELEASE_BOTH: return db_release_both;
+ case DB_RELEASE_NOTHING: return &db_release_nothing;
+ case DB_RELEASE_KEY: return &db_release_key;
+ case DB_RELEASE_DATA: return &db_release_data;
+ case DB_RELEASE_BOTH: return &db_release_both;
default:
ShowError("db_custom_release: Unknown release options %u\n", which);
return NULL;