Skip to content

Commit

Permalink
sblist: update to latest libulz version
Browse files Browse the repository at this point in the history
  • Loading branch information
rofl0r committed Oct 13, 2018
1 parent 47d1680 commit 7d1e9a2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions sblist.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#ifndef PAGE_SIZE
#warning "your C library sucks."
#define PAGE_SIZE 4096
#endif
#define MY_PAGE_SIZE 4096

sblist* sblist_new(size_t itemsize, size_t blockitems) {
sblist* ret = (sblist*) malloc(sizeof(sblist));
Expand All @@ -23,7 +20,7 @@ static void sblist_clear(sblist* l) {

void sblist_init(sblist* l, size_t itemsize, size_t blockitems) {
if(l) {
l->blockitems = blockitems ? blockitems : PAGE_SIZE / itemsize;
l->blockitems = blockitems ? blockitems : MY_PAGE_SIZE / itemsize;
l->itemsize = itemsize;
sblist_clear(l);
}
Expand Down

0 comments on commit 7d1e9a2

Please sign in to comment.