+BT_HIDDEN
+int bt_field_common_string_initialize(struct bt_field_common *field,
+ struct bt_field_type_common *type,
+ bt_object_release_func release_func,
+ struct bt_field_common_methods *methods)
+{
+ int ret = 0;
+ struct bt_field_common_string *string = BT_FROM_COMMON(field);
+
+ BT_LOGD("Initializing common string field object: ft-addr=%p", type);
+ bt_field_common_initialize(field, type, release_func, methods);
+ string->buf = g_array_sized_new(FALSE, FALSE, sizeof(char), 1);
+ if (!string->buf) {
+ ret = -1;
+ goto end;
+ }
+
+ g_array_index(string->buf, char, 0) = '\0';
+ BT_LOGD("Initialized common string field object: addr=%p, ft-addr=%p",
+ field, type);
+
+end:
+ return ret;
+}
+