Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed assertion

Under certain condition Windows may require a bigger size buffer.
Return the slab capped at 64K.

Closes #46
  • Loading branch information...
commit f57bc6ede4780c4129e0ab73b423e269d4c21a77 1 parent d030d0e
@saghul authored
Showing with 4 additions and 4 deletions.
  1. +2 −0  src/pyuv.h
  2. +1 −2  src/stream.c
  3. +1 −2  src/udp.c
View
2  src/pyuv.h
@@ -84,6 +84,8 @@ typedef int Bool;
} \
} while(0) \
+#define PYUV_SLAB_SIZE 65536
+
/* Python types definitions */
View
3  src/stream.c
@@ -9,8 +9,7 @@ typedef struct {
static uv_buf_t
on_stream_alloc(uv_stream_t* handle, size_t suggested_size)
{
- static char slab[65536];
- ASSERT(suggested_size <= sizeof(slab));
+ static char slab[PYUV_SLAB_SIZE];
UNUSED_ARG(handle);
return uv_buf_init(slab, sizeof(slab));
}
View
3  src/udp.c
@@ -9,8 +9,7 @@ typedef struct {
static uv_buf_t
on_udp_alloc(uv_udp_t* handle, size_t suggested_size)
{
- static char slab[65536];
- ASSERT(suggested_size <= sizeof(slab));
+ static char slab[PYUV_SLAB_SIZE];
UNUSED_ARG(handle);
return uv_buf_init(slab, sizeof(slab));
}
Please sign in to comment.
Something went wrong with that request. Please try again.