Removing reliance on C99 standard.

This commit is contained in:
Thomas Hintz 2014-10-22 09:05:37 -07:00
parent 23cecce39d
commit e812e3cbbe
3 changed files with 7 additions and 4 deletions

View File

@ -6,3 +6,4 @@
(release "0.1.0") (release "0.1.0")
(release "0.1.1") (release "0.1.1")
(release "0.1.2") (release "0.1.2")
(release "0.1.3")

View File

@ -198,14 +198,15 @@
const unsigned char* __restrict kb = maskkey2; const unsigned char* __restrict kb = maskkey2;
for (int i = wslen >> 2; i != 0; --i) int i;
for (i = wslen >> 2; i != 0; --i)
{ {
*((unsigned int*)wsv) ^= kd; *((unsigned int*)wsv) ^= kd;
wsv += 4; wsv += 4;
} }
const int rem = wslen & 3; const int rem = wslen & 3;
for (int i = 0; i < rem; ++i) for (i = 0; i < rem; ++i)
{ {
*((unsigned int*)wsv++) ^= kb[i]; *((unsigned int*)wsv++) ^= kb[i];
} }
@ -343,7 +344,8 @@
" "
if (ws_utlen > UINT_MAX) { return -1; } if (ws_utlen > UINT_MAX) { return -1; }
for (int i = ws_utlen; i != 0; --i) int i;
for (i = ws_utlen; i != 0; --i)
{ {
if (*((unsigned char*)ws_uts++) > 127) if (*((unsigned char*)ws_uts++) > 127)
{ {

View File

@ -6,4 +6,4 @@
(install-extension 'websockets (install-extension 'websockets
'("websockets.so" "websockets.import.so") '("websockets.so" "websockets.import.so")
`((version "0.1.2"))) `((version "0.1.3")))