summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-18 01:11:54 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-18 01:11:54 +0300
commit479e48f8e65ffdbc6ceae3189e71ac40b5d85d8e (patch)
tree431ada6dbe3df72b21d471af31ff10acc8711ba5 /src/utils
parent3d5c3d9618096e1a5995d7df2bd3e4098b3c5bd4 (diff)
downloadmanaverse-479e48f8e65ffdbc6ceae3189e71ac40b5d85d8e.tar.gz
manaverse-479e48f8e65ffdbc6ceae3189e71ac40b5d85d8e.tar.bz2
manaverse-479e48f8e65ffdbc6ceae3189e71ac40b5d85d8e.tar.xz
manaverse-479e48f8e65ffdbc6ceae3189e71ac40b5d85d8e.zip
add restrict into base64.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/base64.cpp9
-rw-r--r--src/utils/base64.h8
2 files changed, 9 insertions, 8 deletions
diff --git a/src/utils/base64.cpp b/src/utils/base64.cpp
index 0d9563eac..280e71ff0 100644
--- a/src/utils/base64.cpp
+++ b/src/utils/base64.cpp
@@ -43,8 +43,8 @@ static char base64_table[] =
};
static const char base64_pad = '=';
-unsigned char *php3_base64_encode(const unsigned char *const string,
- int length, int *const ret_length)
+unsigned char *php3_base64_encode(const unsigned char *restrict const string,
+ int length, int *restrict const ret_length)
{
const unsigned char *current = string;
int i = 0;
@@ -93,8 +93,9 @@ unsigned char *php3_base64_encode(const unsigned char *const string,
}
/* as above, but backwards. :) */
-unsigned char *php3_base64_decode(const unsigned char *const string,
- const int length, int *const ret_length)
+unsigned char *php3_base64_decode(const unsigned char *restrict const string,
+ const int length,
+ int *restrict const ret_length)
{
const unsigned char *current = string;
int ch, i = 0, j = 0, k;
diff --git a/src/utils/base64.h b/src/utils/base64.h
index 6ebac7983..0e6546df5 100644
--- a/src/utils/base64.h
+++ b/src/utils/base64.h
@@ -32,9 +32,9 @@
#include "localconsts.h"
-extern unsigned char *php3_base64_encode(const unsigned char *,
- int, int *) A_WARN_UNUSED;
-extern unsigned char *php3_base64_decode(const unsigned char *,
- int, int *) A_WARN_UNUSED;
+extern unsigned char *php3_base64_encode(const unsigned char *restrict,
+ int, int *restrict) A_WARN_UNUSED;
+extern unsigned char *php3_base64_decode(const unsigned char *restrict,
+ int, int *restrict ) A_WARN_UNUSED;
#endif // UTILS_BASE64_H