summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Richter <georg@php.net>2005-07-12 15:45:07 +0000
committerGeorg Richter <georg@php.net>2005-07-12 15:45:07 +0000
commit9aabcf7016a544de1fcabadf912ace828108819d (patch)
treeaf29d70ef1cb0ed35294370bac55363b7aacf6ee
parent3e5ddd2a80d8cfc08618075539977d47a5b88d11 (diff)
downloadphp-git-9aabcf7016a544de1fcabadf912ace828108819d.tar.gz
changed version dependency for charset functions
-rw-r--r--ext/mysqli/mysqli_nonapi.c2
-rw-r--r--ext/mysqli/php_mysqli.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c
index 329dc88500..0e620db54f 100644
--- a/ext/mysqli/mysqli_nonapi.c
+++ b/ext/mysqli/mysqli_nonapi.c
@@ -323,6 +323,7 @@ PHP_FUNCTION(mysqli_set_charset)
/* }}} */
#endif
+#ifdef HAVE_MYSQLI_GET_CHARSET
/* {{{ object mysqli_get_charset(object link)
returns a character set object */
PHP_FUNCTION(mysqli_get_charset)
@@ -350,6 +351,7 @@ PHP_FUNCTION(mysqli_get_charset)
add_property_long(return_value, "state", cs.state);
}
/* }}} */
+#endif
/*
* Local variables:
diff --git a/ext/mysqli/php_mysqli.h b/ext/mysqli/php_mysqli.h
index d285eb10c8..d07ccfb162 100644
--- a/ext/mysqli/php_mysqli.h
+++ b/ext/mysqli/php_mysqli.h
@@ -29,6 +29,10 @@
/* character set support */
#if MYSQL_VERSION_ID > 50009
+#define HAVE_MYSQLI_GET_CHARSET
+#endif
+
+#if (MYSQL_VERSION_ID > 40112 && MYSQL_VERSION_ID < 50000) || MYSQL_VERSION_ID > 50005
#define HAVE_MYSQLI_SET_CHARSET
#endif