save
[protos/libecoli.git] / lib / ecoli_tk_space.c
index fc3a5b3..8b26d99 100644 (file)
@@ -75,15 +75,17 @@ static struct ec_parsed_tk *ec_tk_space_parse(const struct ec_tk *gen_tk,
        return NULL;
 }
 
-static struct ec_tk_ops ec_tk_space_ops = {
-       .typename = "space",
+static struct ec_tk_type ec_tk_space_type = {
+       .name = "space",
        .parse = ec_tk_space_parse,
        .complete = ec_tk_default_complete,
 };
 
+EC_TK_TYPE_REGISTER(ec_tk_space_type);
+
 struct ec_tk *ec_tk_space_new(const char *id)
 {
-       return ec_tk_new(id, &ec_tk_space_ops, sizeof(struct ec_tk_space));
+       return ec_tk_new(id, &ec_tk_space_type, sizeof(struct ec_tk_space));
 }
 
 static int ec_tk_space_testcase(void)
@@ -131,4 +133,4 @@ static struct ec_test ec_tk_space_test = {
        .test = ec_tk_space_testcase,
 };
 
-EC_REGISTER_TEST(ec_tk_space_test);
+EC_TEST_REGISTER(ec_tk_space_test);