*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
*/
#include <babeltrace/compiler.h>
#include <babeltrace/format.h>
+#include <babeltrace/types.h>
#include <inttypes.h>
static
str = g_string_new("");
g_string_printf(str, "[%" PRIu64 "]", i);
- (void) g_string_free(str, TRUE);
name = g_quark_from_string(str->str);
+ (void) g_string_free(str, TRUE);
field = (struct definition **) &g_ptr_array_index(sequence_definition->elems, i);
*field = sequence_declaration->elem->definition_new(sequence_declaration->elem,
sequence_definition->p.scope,
name, i, NULL);
+ }
+ for (i = 0; i < len; i++) {
+ struct definition **field;
+
+ field = (struct definition **) &g_ptr_array_index(sequence_definition->elems, i);
ret = generic_rw(pos, *field);
if (ret)
return ret;
declaration = &sequence_declaration->p;
sequence_declaration->length_name = g_array_new(FALSE, TRUE, sizeof(GQuark));
- append_scope_path(length, sequence_declaration->length_name);
+ bt_append_scope_path(length, sequence_declaration->length_name);
declaration_ref(elem_declaration);
sequence_declaration->elem = elem_declaration;
field = g_ptr_array_index(sequence->elems, i);
field->declaration->definition_free(field);
}
+ (void) g_ptr_array_free(sequence->elems, TRUE);
}
- (void) g_ptr_array_free(sequence->elems, TRUE);
definition_unref(len_definition);
free_definition_scope(sequence->p.scope);
declaration_unref(sequence->p.declaration);