update utils helper
authorPeng Wu <alexepico@gmail.com>
Thu, 18 Oct 2012 08:50:24 +0000 (16:50 +0800)
committerPeng Wu <alexepico@gmail.com>
Thu, 18 Oct 2012 08:50:24 +0000 (16:50 +0800)
utils/utils_helper.h

index db2a5c1..bada86b 100644 (file)
 #ifndef UTILS_HELPER_H
 #define UTILS_HELPER_H
 
-#define TAGLIB_GET_VALUE(var, index)                                    \
+
+#define TAGLIB_GET_TOKEN(var, index)                                    \
     phrase_token_t var = null_token;                                    \
     {                                                                   \
         const char * string = (const char *) g_ptr_array_index          \
             (values, index);                                            \
-        var = taglib_string_to_token                                    \
-            (phrase_table, phrase_index, string);                       \
+        var = atoi(string);                                             \
+    }
+
+#define TAGLIB_GET_PHRASE_STRING(var, index)                            \
+    const char * var = NULL;                                            \
+    {                                                                   \
+        var = (const char *) g_ptr_array_index                          \
+            (values, index);                                            \
     }
 
 #define TAGLIB_GET_TAGVALUE(type, var, conv)                            \