Skip to content

Commit

Permalink
getting rid of excess imports
Browse files Browse the repository at this point in the history
  • Loading branch information
mikevoronov committed Jun 29, 2020
1 parent dde3fce commit 88142c9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
7 changes: 1 addition & 6 deletions src/Makefile_wasm
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ EXPORT_FUNCS = \
--export=deallocate,$\
--export=invoke,$\
--export=load,$\
--export=store,$\
--export=redis_allocate,$\
--export=redis_deallocate,$\
--export=redis_invoke,$\
--export=redis_load,$\
--export=redis_store
--export=store

REDIS_SERVER_SRC = \
adlist.c\
Expand Down
20 changes: 0 additions & 20 deletions src/wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,18 @@ void* allocate(size_t size) {
return zmalloc(size + 1);
}

void* redis_allocate(size_t size) {
return allocate(size);
}

void deallocate(void *ptr, int size) {
zfree(ptr);
}

void redis_deallocate(void *ptr, int size) {
deallocate(ptr, size);
}

void store(char *ptr, unsigned char byte) {
*ptr = byte;
}

void redis_store(char *ptr, unsigned char byte) {
store(ptr, byte);
}

unsigned char load(const unsigned char *ptr) {
return *ptr;
}

unsigned char redis_load(const unsigned char *ptr) {
return load(ptr);
}

// Cleans client output buffers to - client is blocked and
// doesn't receive requests until output buffer isn't empty.
void clean_client_buffer(client *c) {
Expand Down Expand Up @@ -145,7 +129,3 @@ const char *invoke(char *request, int request_size) {

return response;
}

const char *redis_invoke(char *request, int request_size) {
return invoke(request, request_size);
}

0 comments on commit 88142c9

Please sign in to comment.