diff --git a/legacy/evas/src/lib/Evas.h b/legacy/evas/src/lib/Evas.h index fcac8eecd8..4f24344e00 100644 --- a/legacy/evas/src/lib/Evas.h +++ b/legacy/evas/src/lib/Evas.h @@ -95,9 +95,12 @@ struct _Evas_Rectangle /** A rectangle */ int h; /**< height of rectangle */ }; +#define EVAS_SMART_CLASS_VERSION 1 /** the version you have to put into the version field in the smart class struct */ struct _Evas_Smart_Class /** a smart object class */ { const char *name; /** the string name of the class */ + + int version; void (*add) (Evas_Object *o); void (*del) (Evas_Object *o); diff --git a/legacy/evas/src/lib/canvas/evas_smart.c b/legacy/evas/src/lib/canvas/evas_smart.c index f49930c357..b3a0c5f7b2 100644 --- a/legacy/evas/src/lib/canvas/evas_smart.c +++ b/legacy/evas/src/lib/canvas/evas_smart.c @@ -90,6 +90,9 @@ evas_smart_class_new(Evas_Smart_Class *sc) if (!sc) return NULL; + /* api does not match abi! for now refuse as we only have 1 version */ + if (sc->version != EVAS_SMART_CLASS_VERSION) return NULL; + s = evas_mem_calloc(sizeof(Evas_Smart)); if (!s) return NULL;