Skip to content
Snippets Groups Projects
Select Git revision
  • 3a5d8fab55631683349341ca5f61f09aaed02c70
  • master default protected
  • release/8.0-perimetres
  • php84
  • detached3
  • 6.x
  • 7.x
  • detached2
  • detached
  • php82
  • 5.x
  • cherry-pick-bf3b5271
  • v5.x-test
  • laminas_migration
  • 7.2.9
  • 7.2.8
  • 7.2.7
  • 7.2.6
  • 7.2.5
  • 7.2.4
  • 7.2.3
  • 7.2.2
  • 7.2.1
  • 7.2.0
  • 7.1.3
  • 7.1.2
  • 7.1.1
  • 7.1.0
  • 7.0.1
  • 7.0.0
  • 6.1.11
  • 6.1.10
  • 6.1.9
  • 6.1.8
34 results

001_tables.sql

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    hash_tbl.c 529 B
    #include <stddef.h>
    #include "list.h"
    
    #define ARRAY_CAPACITY 1 << 16
    
    struct hash_tbl {
      size_t (*h)(void*);
      int (*eq)(void*, void*);
      void (*free)(void*);
      unsigned long int size;
      size_t capacity; // array length
      list_t* array;
    };
    
    typedef struct hash_tbl* hash_tbl;
    
    hash_tbl htbl_empty(size_t (*h)(void*),
                        int (*eq)(void*, void*),
                        void (*free)(void*)){
    }
    
    int htbl_add(hash_tbl htbl, void* x){
    }
    
    int htbl_in(hash_tbl htbl, void* x){
    }
    
    void htbl_destroy(hash_tbl htbl){
    }