namespace the array functions
[babeltrace.git] / types / sequence.c
index 7d060e4b06224098fe7acfeceda84f8a24589077..3967f977a105b6fc815940a6702291f7cb443e98 100644 (file)
  *
  * 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
@@ -102,7 +111,7 @@ struct declaration_sequence *
        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;
@@ -205,8 +214,8 @@ void _sequence_definition_free(struct definition *definition)
                        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);
This page took 0.023426 seconds and 4 git commands to generate.