bama4 / simple-http-server

A simple lightweight HTTP server in C
0 stars 0 forks source link

Create HashMap Library #11

Closed bama4 closed 2 years ago

bama4 commented 3 years ago

Description This ticket involves implementing a hashmap library. The hashmap library should be under the utils top level directory.

This hashmap library should be linked with all of the other util packages into one library called libutils.so

This will be implemented as:

(See Open Addressing)

Goal The following functions are created for the hashmap:

Also:

garfr commented 3 years ago

I think a hashmap is going to be pretty heavily used. Have you considered writing a generic implementation so we can reuse it? Like one that takes function pointers to the hashing functions for example. We could always write a type-safe wrapper over it for a specific use. Writing a good hashmap is not a trivial task, and if this is a forward-facing web server we ought to put at least a bit of thought into security.

garfr commented 3 years ago

I am also not sure if hashmap needs its own directory, as it should fit into a single source and header file. Building it into its own library and linking against the libutils.so library seems overly complex.

bama4 commented 3 years ago

I am also not sure if hashmap needs its own directory, as it should fit into a single source and header file. Building it into its own library and linking against the libutils.so library seems overly complex.

It was a mistake, as we agreed, all of the utility libraries can be under a single utils directory