Summary: fix, make sure ase-heap emits all symbols it needs
authorSebastian Freundt <freundt@ga-group.nl>
Fri, 9 Mar 2012 12:30:04 +0000 (12:30 +0000)
committerSebastian Freundt <freundt@ga-group.nl>
Fri, 9 Mar 2012 12:30:04 +0000 (12:30 +0000)
Keywords: bld/chn

This changeset fixes an issue with the ase-heap emodule.  Ctors and
wrappers are now declared and defined in the file that they're used.

* modules/ase/ase-heap.h: kick static inlines, no need to expose them

* modules/ase/ase-heap.c: soak up static inlines decls from the header

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
modules/ase/ase-heap.c
modules/ase/ase-heap.h

index e5757e1..9ab2c03 100644 (file)
@@ -62,6 +62,13 @@ Lisp_Object Qweak, Qdense, Qdynamic, Q_kind, Q_relation, Q_coloured;
 #define ASE_HEAP_MIN_SIZE      4096    /* 65536 */
 #define ALIGNED(n)     __attribute__((aligned(n), packed))
 
+static inline ase_yheap_t _ase_make_yheap(ase_heap_options_t opts);
+static inline Lisp_Object _ase_wrap_yheap(ase_yheap_t);
+static inline ase_dheap_t _ase_make_dheap(ase_heap_options_t opts);
+static inline Lisp_Object _ase_wrap_dheap(ase_dheap_t);
+static inline ase_wheap_t _ase_make_wheap(ase_heap_options_t opts);
+static inline Lisp_Object _ase_wrap_wheap(ase_wheap_t);
+
 /* the op tables */
 struct ase_heap_ops_s ase_heap_ops[NUMBER_OF_ASE_HEAP_KINDS] =
 {{(ase_heap_constr_f)_ase_make_yheap, (ase_heap_wrap_f)_ase_wrap_yheap,
@@ -527,7 +534,7 @@ _ase_make_heap_cell(ase_yheap_cell_t mother)
        return c;
 }
 
-Lisp_Object
+static inline Lisp_Object
 _ase_wrap_yheap(ase_yheap_t h)
 {
        Lisp_Object result;
@@ -547,7 +554,7 @@ _ase_wrap_yheap(ase_yheap_t h)
        return result;
 }
 
-Lisp_Object
+static inline Lisp_Object
 _ase_wrap_dheap(ase_dheap_t h)
 {
        Lisp_Object result;
@@ -567,7 +574,7 @@ _ase_wrap_dheap(ase_dheap_t h)
        return result;
 }
 
-ase_dheap_t
+static inline ase_dheap_t
 _ase_make_dheap(ase_heap_options_t opts)
 {
        ase_dheap_t h = xnew(struct ase_dheap_s);
@@ -604,7 +611,7 @@ Lisp_Object ase_make_dheap(ase_heap_options_t opts)
        return _ase_wrap_dheap(h);
 }
 
-Lisp_Object
+static inline Lisp_Object
 _ase_wrap_wheap(ase_wheap_t h)
 {
        Lisp_Object result;
@@ -624,7 +631,7 @@ _ase_wrap_wheap(ase_wheap_t h)
        return result;
 }
 
-ase_wheap_t
+static inline ase_wheap_t
 _ase_make_wheap(ase_heap_options_t opts)
 {
        ase_wheap_t h = xnew(struct ase_wheap_s);
@@ -664,7 +671,7 @@ Lisp_Object ase_make_wheap(ase_heap_options_t opts)
        return _ase_wrap_wheap(h);
 }
 
-inline ase_yheap_t
+static inline ase_yheap_t
 _ase_make_yheap(ase_heap_options_t opts)
 {
        ase_yheap_t h = xnew(struct ase_yheap_s);
index 4233201..460a340 100644 (file)
@@ -287,8 +287,6 @@ extern Lisp_Object ase_wheap_to_dllist(ase_wheap_t);
 
 \f
 /* dyna heaps */
-static inline ase_yheap_t _ase_make_yheap(ase_heap_options_t opts);
-static inline Lisp_Object _ase_wrap_yheap(ase_yheap_t);
 extern Lisp_Object ase_make_yheap(ase_heap_options_t opts);
 extern void ase_add_yheap(ase_yheap_t h, Lisp_Object o, Lisp_Object colour);
 extern Lisp_Object ase_pop_yheap(ase_yheap_t h);
@@ -296,8 +294,6 @@ extern Lisp_Object ase_yheap_top(ase_yheap_t h);
 extern Lisp_Object ase_yheap_top_rank(ase_yheap_t h);
 
 /* dense heaps */
-static inline ase_dheap_t _ase_make_dheap(ase_heap_options_t opts);
-static inline Lisp_Object _ase_wrap_dheap(ase_dheap_t);
 extern Lisp_Object ase_make_dheap(ase_heap_options_t opts);
 extern void ase_add_dheap(ase_dheap_t h, Lisp_Object o, Lisp_Object colour);
 extern Lisp_Object ase_pop_dheap(ase_dheap_t h);
@@ -305,8 +301,6 @@ extern Lisp_Object ase_dheap_top(ase_dheap_t h);
 extern Lisp_Object ase_dheap_top_rank(ase_dheap_t h);
 
 /* weak heaps */
-static inline ase_wheap_t _ase_make_wheap(ase_heap_options_t opts);
-static inline Lisp_Object _ase_wrap_wheap(ase_wheap_t);
 extern Lisp_Object ase_make_wheap(ase_heap_options_t opts);
 extern void ase_add_wheap(ase_wheap_t h, Lisp_Object o, Lisp_Object colour);
 extern Lisp_Object ase_pop_wheap(ase_wheap_t h);