Address static inline warning in ase.
authorNelson Ferreira <nelson.ferreira@ieee.org>
Sun, 27 Sep 2015 21:14:52 +0000 (17:14 -0400)
committerNelson Ferreira <nelson.ferreira@ieee.org>
Sun, 27 Sep 2015 21:14:52 +0000 (17:14 -0400)
* modules/ase/ase-neighbourhood.h: Use extern_inline.
(ase_neighbourhood_point): Move definition to header.
(ase_neighbourhood_radius): Ditto.
(ase_neighbourhood_rational_measure): Ditto.
(ase_neighbourhood_lebesgue_measure): Ditto.
(_ase_neighbourhood_lebesgue): Inline dependency hoisted.
(_ase_neighbourhood_update_lebesgue): Ditto.
(_ase_neighbourhood_rational): Ditto.
(_ase_neighbourhood_update_rational): Ditto.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
modules/ase/ase-neighbourhood.c
modules/ase/ase-neighbourhood.h

index 638b2f3..0e9b590 100644 (file)
@@ -238,66 +238,6 @@ ase_make_neighbourhood(Lisp_Object pt, Lisp_Object rad, Lisp_Object metric)
        return result;
 }
 
-/* accessors */
-inline Lisp_Object
-ase_neighbourhood_point(ase_neighbourhood_t n)
-{
-       return n->point;
-}
-
-inline Lisp_Object
-ase_neighbourhood_radius(ase_neighbourhood_t n)
-{
-       return n->radius;
-}
-
-/* Measures */
-static inline void
-_ase_neighbourhood_update_lebesgue(ase_neighbourhood_t n)
-{
-       if (n && NILP(n->lebesgue_measure)) {
-               Lisp_Object i = n->ldata;
-               n->lebesgue_measure = Fase_interval_lebesgue_measure(i);
-       }
-       return;
-}
-
-static inline Lisp_Object
-_ase_neighbourhood_lebesgue(ase_neighbourhood_t n)
-{
-       return n->lebesgue_measure;
-}
-
-inline Lisp_Object
-ase_neighbourhood_lebesgue_measure(ase_neighbourhood_t n)
-{
-       _ase_neighbourhood_update_lebesgue(n);
-       return _ase_neighbourhood_lebesgue(n);
-}
-
-static inline void
-_ase_neighbourhood_update_rational(ase_neighbourhood_t n)
-{
-       if (n && NILP(n->rational_measure)) {
-               Lisp_Object i = n->ldata;
-               n->rational_measure = Fase_interval_rational_measure(i);
-       }
-       return;
-}
-
-static inline Lisp_Object
-_ase_neighbourhood_rational(ase_neighbourhood_t n)
-{
-       return n->rational_measure;
-}
-
-inline Lisp_Object
-ase_neighbourhood_rational_measure(ase_neighbourhood_t n)
-{
-       _ase_neighbourhood_update_rational(n);
-       return _ase_neighbourhood_rational(n);
-}
-
 \f
 /* lisp level */
 DEFUN("ase-neighbourhoodp", Fase_neighbourhoodp, 1, 1, 0, /*
index 52b26c9..e4f365a 100644 (file)
@@ -131,34 +131,95 @@ extern Lisp_Object ase_neighbourhood_closure(Lisp_Object nbh);
 extern Lisp_Object ase_neighbourhood_interior(Lisp_Object nbh);
 
 /* predicates */
-static inline bool
+extern_inline bool
 ase_neighbourhood_contains_obj_p(ase_neighbourhood_t, Lisp_Object);
-static inline bool
+extern_inline bool
 ase_neighbourhood_contains_nbh_p(ase_neighbourhood_t, ase_neighbourhood_t);
-static inline bool ase_neighbourhood_open_p(ase_neighbourhood_t);
-static inline bool ase_neighbourhood_closed_p(ase_neighbourhood_t);
-static inline bool
+extern_inline bool ase_neighbourhood_open_p(ase_neighbourhood_t);
+extern_inline bool ase_neighbourhood_closed_p(ase_neighbourhood_t);
+extern_inline bool
 ase_neighbourhood_less_obj_p(ase_neighbourhood_t, Lisp_Object);
-static inline bool
+extern_inline bool
 ase_neighbourhood_less_nbh_p(ase_neighbourhood_t, ase_neighbourhood_t);
-static inline bool
+extern_inline bool
 ase_neighbourhood_greater_obj_p(ase_neighbourhood_t, Lisp_Object);
-static inline bool
+extern_inline bool
 ase_neighbourhood_greater_nbh_p(ase_neighbourhood_t, ase_neighbourhood_t);
 
-static inline Lisp_Object
+extern_inline Lisp_Object
 ase_neighbourhood_point(ase_neighbourhood_t);
-static inline Lisp_Object
+extern_inline Lisp_Object
 ase_neighbourhood_radius(ase_neighbourhood_t);
 
 /* measures */
-static inline Lisp_Object
+extern_inline Lisp_Object
 ase_neighbourhood_lebesgue_measure(ase_neighbourhood_t);
-static inline Lisp_Object
+extern_inline Lisp_Object
 ase_neighbourhood_rational_measure(ase_neighbourhood_t);
 
 /* inlines */
-static inline bool
+extern_inline Lisp_Object
+ase_neighbourhood_point(ase_neighbourhood_t n)
+{
+       return n->point;
+}
+
+extern_inline Lisp_Object
+ase_neighbourhood_radius(ase_neighbourhood_t n)
+{
+       return n->radius;
+}
+
+/* Measures */
+extern_inline void
+_ase_neighbourhood_update_rational(ase_neighbourhood_t n)
+{
+       if (n && NILP(n->rational_measure)) {
+               Lisp_Object i = n->ldata;
+               n->rational_measure = Fase_interval_rational_measure(i);
+       }
+       return;
+}
+
+extern_inline Lisp_Object
+_ase_neighbourhood_rational(ase_neighbourhood_t n)
+{
+       return n->rational_measure;
+}
+
+extern_inline Lisp_Object
+ase_neighbourhood_rational_measure(ase_neighbourhood_t n)
+{
+       _ase_neighbourhood_update_rational(n);
+       return _ase_neighbourhood_rational(n);
+}
+
+extern_inline void
+_ase_neighbourhood_update_lebesgue(ase_neighbourhood_t n)
+{
+       if (n && NILP(n->lebesgue_measure)) {
+               Lisp_Object i = n->ldata;
+               n->lebesgue_measure = Fase_interval_lebesgue_measure(i);
+       }
+       return;
+}
+
+extern_inline Lisp_Object
+_ase_neighbourhood_lebesgue(ase_neighbourhood_t n)
+{
+       return n->lebesgue_measure;
+}
+
+extern_inline Lisp_Object
+ase_neighbourhood_lebesgue_measure(ase_neighbourhood_t n)
+{
+       _ase_neighbourhood_update_lebesgue(n);
+       return _ase_neighbourhood_lebesgue(n);
+}
+
+
+
+extern_inline bool
 ase_neighbourhood_contains_obj_p(ase_neighbourhood_t n, Lisp_Object obj)
 {
        /* we _know_ atm that n->ldata points to an ase_interval_t */
@@ -166,7 +227,7 @@ ase_neighbourhood_contains_obj_p(ase_neighbourhood_t n, Lisp_Object obj)
        return !NILP(Fase_interval_contains_p(intv, obj));
 }
 
-static inline bool
+extern_inline bool
 ase_neighbourhood_contains_nbh_p(ase_neighbourhood_t n1, ase_neighbourhood_t n2)
 {
        /* we _know_ atm that {n1,n2}->data points to an ase_interval_t */
@@ -175,19 +236,19 @@ ase_neighbourhood_contains_nbh_p(ase_neighbourhood_t n1, ase_neighbourhood_t n2)
        return !NILP(Fase_interval_contains_p(i1, i2));
 }
 
-static inline bool
+extern_inline bool
 ase_neighbourhood_open_p(ase_neighbourhood_t n)
 {
        return n->open_p;
 }
 
-static inline bool
+extern_inline bool
 ase_neighbourhood_closed_p(ase_neighbourhood_t n)
 {
        return !n->open_p;
 }
 
-static inline bool
+extern_inline bool
 ase_neighbourhood_less_obj_p(ase_neighbourhood_t n, Lisp_Object obj)
 {
        /* we _know_ atm that {n1,n2}->data points to an ase_interval_t */
@@ -196,7 +257,7 @@ ase_neighbourhood_less_obj_p(ase_neighbourhood_t n, Lisp_Object obj)
        return (_ase_less_p(a->upper, obj) || _ase_equal_p(a->upper, obj));
 }
 
-static inline bool
+extern_inline bool
 ase_neighbourhood_less_nbh_p(ase_neighbourhood_t n1, ase_neighbourhood_t n2)
 {
        /* we _know_ atm that {n1,n2}->data points to an ase_interval_t */
@@ -206,7 +267,7 @@ ase_neighbourhood_less_nbh_p(ase_neighbourhood_t n1, ase_neighbourhood_t n2)
                _ase_equal_p(a1->upper, a2->lower));
 }
 
-static inline bool
+extern_inline bool
 ase_neighbourhood_greater_obj_p(ase_neighbourhood_t n, Lisp_Object obj)
 {
        /* we _know_ atm that {n1,n2}->data points to an ase_interval_t */
@@ -214,7 +275,7 @@ ase_neighbourhood_greater_obj_p(ase_neighbourhood_t n, Lisp_Object obj)
        return (_ase_less_p(obj, a->lower) || _ase_equal_p(obj, a->lower));
 }
 
-static inline bool
+extern_inline bool
 ase_neighbourhood_greater_nbh_p(ase_neighbourhood_t n1, ase_neighbourhood_t n2)
 {
        /* we _know_ atm that {n1,n2}->data points to an ase_interval_t */