RPA Toolkit
Work on a new hash array implementation.
authorMartin Stoilov <martin@rpasearch.com>
Mon, 6 Jun 2011 05:59:50 +0000 (22:59 -0700)
committerMartin Stoilov <martin@rpasearch.com>
Mon, 6 Jun 2011 05:59:50 +0000 (22:59 -0700)
rlib/build/linux/rlib.mk
rlib/rhasharray.c [new file with mode: 0644]
rlib/rhasharray.h [new file with mode: 0644]

index 17731b1..1321822 100644 (file)
@@ -13,6 +13,7 @@ RLIB_OBJECTS +=       $(OUTDIR)/ratomic.o
 RLIB_OBJECTS +=        $(OUTDIR)/rspinlock.o
 RLIB_OBJECTS +=        $(OUTDIR)/rjsobject.o
 RLIB_OBJECTS +=        $(OUTDIR)/rharray.o
+RLIB_OBJECTS +=        $(OUTDIR)/rhasharray.o
 RLIB_OBJECTS +=        $(OUTDIR)/rcarray.o
 RLIB_OBJECTS +=        $(OUTDIR)/rarray.o
 RLIB_OBJECTS +=        $(OUTDIR)/rhash.o
diff --git a/rlib/rhasharray.c b/rlib/rhasharray.c
new file mode 100644 (file)
index 0000000..9173bb9
--- /dev/null
@@ -0,0 +1,16 @@
+#include "rhasharray.h"
+#include "rstring.h"
+#include "rmem.h"
+
+
+rhasharray_t *r_hasharray_create(ruint elt_size)
+{
+       return NULL;
+}
+
+
+void r_hasharray_destroy(rhasharray_t *array)
+{
+
+}
+
diff --git a/rlib/rhasharray.h b/rlib/rhasharray.h
new file mode 100644 (file)
index 0000000..cf5fc24
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef _RHASHARRAY_H_
+#define _RHASHARRAY_H_
+
+#include "rcarray.h"
+#include "rhash.h"
+#include "rstring.h"
+#include "robject.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+typedef struct rhasharray_s {
+       robject_t obj;
+       rcarray_t *members;
+       rarray_t *names;
+       rhash_t *hash;
+} rhasharray_t;
+
+
+rhasharray_t *r_hasharray_create(ruint elt_size);
+void r_hasharray_destroy(rhasharray_t *array);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RHASHARRAY_H_ */