disabled function inlining to escape msvc optimization problem

This commit is contained in:
Roman Arutyunyan 2013-06-13 14:01:26 +04:00
parent 01c8daf4b4
commit c4e78b6ea9

View file

@ -155,6 +155,13 @@ ngx_rtmp_stat_escape(ngx_http_request_t *r, void *data, size_t len)
return new_data;
}
#if (NGX_WIN32)
/*
* Fix broken MSVC memcpy optimization for 4-byte data
* when this function is inlined
*/
__declspec(noinline)
#endif
static void
ngx_rtmp_stat_output(ngx_http_request_t *r, ngx_chain_t ***lll,
@ -204,15 +211,6 @@ ngx_rtmp_stat_output(ngx_http_request_t *r, ngx_chain_t ***lll,
if (escape) {
b->last = (u_char *)ngx_escape_html(b->last, data, len);
} else {
#if (NGX_WIN32)
/* fix broken MSVC memcpy optimization for 4-byte data */
if (len == 4) {
*(uint32_t *) b->last = *(uint32_t *) data;
b->last += 4;
return;
}
#endif
b->last = ngx_cpymem(b->last, data, len);
}
}