File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ exqlite_malloc(int bytes)
3737{
3838 assert (bytes > 0 );
3939
40- int * p = enif_alloc (bytes + sizeof (int ));
40+ size_t * p = enif_alloc (bytes + sizeof (size_t ));
4141 if (p ) {
4242 p [0 ] = bytes ;
4343 p ++ ;
@@ -53,7 +53,7 @@ exqlite_free(void* prior)
5353 return ;
5454 }
5555
56- int * p = prior ;
56+ size_t * p = prior ;
5757
5858 // Shift the pointer back to free the proper block of data
5959 p -- ;
@@ -67,10 +67,10 @@ exqlite_realloc(void* prior, int bytes)
6767 assert (prior );
6868 assert (bytes > 0 );
6969
70- int * p = prior ;
70+ size_t * p = prior ;
7171 p -- ;
7272
73- p = enif_realloc (p , bytes + sizeof (int ));
73+ p = enif_realloc (p , bytes + sizeof (size_t ));
7474 if (p ) {
7575 p [0 ] = bytes ;
7676 p ++ ;
@@ -86,7 +86,7 @@ exqlite_mem_size(void* prior)
8686 return 0 ;
8787 }
8888
89- int * p = prior ;
89+ size_t * p = prior ;
9090 p -- ;
9191
9292 return p [0 ];
You can’t perform that action at this time.
0 commit comments