aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Egraph.h2
-rw-r--r--egraph.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/Egraph.h b/Egraph.h
index 553d5cd..ead5054 100644
--- a/Egraph.h
+++ b/Egraph.h
@@ -6,6 +6,8 @@
#define EGRAPH_VERTICES_MAX 16384 /* cannot be more that u_int32_t */
#define EGRAPH_VERTICE_NAME_MAXLEN 60
+#define EGRAPH_TYPE_MAXLEN 30
+
typedef struct Egraph Egraph;
typedef struct Egraph_Edge Egraph_Edge;
typedef struct Egraph_Vertice Egraph_Vertice;
diff --git a/egraph.c b/egraph.c
index c278f34..9056545 100644
--- a/egraph.c
+++ b/egraph.c
@@ -7,8 +7,6 @@
#define DEBUG 0
-#define TYPE_MAXLEN 30
-
static void _smart_add(Evas_Object *obj);
static void _smart_del(Evas_Object *obj);
static void _smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
@@ -375,7 +373,7 @@ egraph_edge_type_set(Evas_Object *obj, Egraph_Edge *e, const char *type)
if (e->type)
free(e->type);
- e->type = strndup(type, TYPE_MAXLEN);
+ e->type = strndup(type, EGRAPH_TYPE_MAXLEN);
if (eg->theme_edges && e->o) {
_edje_obj_set(eg, e->o, type);
}
@@ -619,7 +617,7 @@ egraph_vertice_type_set(Evas_Object *obj, Egraph_Vertice *v, const char *type)
if (v->type)
free(v->type);
- v->type = strndup(type, TYPE_MAXLEN);
+ v->type = strndup(type, EGRAPH_TYPE_MAXLEN);
if (v->o)
_edje_obj_set(eg, v->o, type);
}