tracker-0.16.2/src/libtracker-data/tracker-sparql-query.c

Location Tool Test ID Function Issue
tracker-sparql-query.c:396:0 cppcheck syntaxError syntax error
tracker-sparql-query.c:1521:2 gcc _tracker_sparql_variable_hash_ghash_func passing argument 1 of 'tracker_sparql_variable_hash' discards 'const' qualifier from pointer target type [enabled by default]
tracker-sparql-query.c:1530:2 gcc _tracker_sparql_variable_equal_gequal_func passing argument 1 of 'tracker_sparql_variable_equal' discards 'const' qualifier from pointer target type [enabled by default]
tracker-sparql-query.c:1796:23 gcc unused-but-set-variable tracker_sparql_context_get_variable variable '_tmp5_' set but not used
tracker-sparql-query.c:1811:3 clang-analyzer Value stored to '_tmp5_' is never read
tracker-sparql-query.c:2574:7 gcc unused-but-set-variable tracker_sparql_query_construct variable '_tmp7__length1' set but not used
tracker-sparql-query.c:2622:2 clang-analyzer Value stored to '_tmp7__length1' is never read
tracker-sparql-query.c:2858:7 gcc unused-but-set-variable tracker_sparql_query_get_uuid_for_name variable '_tmp1__length1' set but not used
tracker-sparql-query.c:2884:2 clang-analyzer Value stored to '_tmp1__length1' is never read
tracker-sparql-query.c:3038:10 gcc unused-but-set-variable tracker_sparql_query_generate_bnodeid variable '_tmp17__length1' set but not used
tracker-sparql-query.c:3060:5 clang-analyzer Value stored to '_new_base_uuid_size_' is never read
tracker-sparql-query.c:3064:5 clang-analyzer Value stored to '_tmp17__length1' is never read
tracker-sparql-query.c:3132:25 clang-analyzer Value stored to 'begin' during its initialization is never read
tracker-sparql-query.c:3133:25 clang-analyzer Value stored to 'end' during its initialization is never read
tracker-sparql-query.c:3148:8 gcc unused-but-set-variable tracker_sparql_query_next variable '_tmp13__length1' set but not used
tracker-sparql-query.c:3183:3 clang-analyzer Value stored to '_tmp7__length1' is never read
tracker-sparql-query.c:3193:3 clang-analyzer Value stored to '_tmp10__length1' is never read
tracker-sparql-query.c:3203:3 clang-analyzer Value stored to '_tmp13__length1' is never read
tracker-sparql-query.c:3217:2 clang-analyzer Value stored to '_tmp16__length1' is never read
tracker-sparql-query.c:3235:7 gcc unused-but-set-variable tracker_sparql_query_current variable '_tmp0__length1' set but not used
tracker-sparql-query.c:3244:2 clang-analyzer Value stored to '_tmp0__length1' is never read
tracker-sparql-query.c:3264:7 gcc unused-but-set-variable tracker_sparql_query_last variable '_tmp1__length1' set but not used
tracker-sparql-query.c:3276:2 clang-analyzer Value stored to '_tmp1__length1' is never read
tracker-sparql-query.c:3346:7 gcc unused-but-set-variable tracker_sparql_query_get_error variable '_tmp5__length1' set but not used
tracker-sparql-query.c:3363:2 clang-analyzer Value stored to '_tmp0__length1' is never read
tracker-sparql-query.c:3375:2 clang-analyzer Value stored to '_tmp5__length1' is never read
tracker-sparql-query.c:3413:7 gcc unused-but-set-variable tracker_sparql_query_get_internal_error variable '_tmp5__length1' set but not used
tracker-sparql-query.c:3430:2 clang-analyzer Value stored to '_tmp0__length1' is never read
tracker-sparql-query.c:3442:2 clang-analyzer Value stored to '_tmp5__length1' is never read
tracker-sparql-query.c:3555:7 gcc unused-but-set-variable tracker_sparql_query_get_location variable '_tmp0__length1' set but not used
tracker-sparql-query.c:3564:2 clang-analyzer Value stored to '_tmp0__length1' is never read
tracker-sparql-query.c:3661:7 gcc unused-but-set-variable tracker_sparql_query_get_last_string variable '_tmp10__length1' set but not used
tracker-sparql-query.c:3676:2 clang-analyzer Value stored to '_tmp1__length1' is never read
tracker-sparql-query.c:3688:2 clang-analyzer Value stored to '_tmp6__length1' is never read
tracker-sparql-query.c:3698:2 clang-analyzer Value stored to '_tmp10__length1' is never read
tracker-sparql-query.c:4006:3 clang-analyzer Value stored to 'ns_collection_length1' is never read
tracker-sparql-query.c:4394:3 clang-analyzer Value stored to 'ns_collection_length1' is never read
tracker-sparql-query.c:5368:11 clang-analyzer Access to field 'types' results in a dereference of a null pointer (loaded from variable '_tmp3_')
tracker-sparql-query.c:5853:7 gcc unused-but-set-variable tracker_sparql_query_execute_ask_cursor variable '_tmp4__length1' set but not used
tracker-sparql-query.c:5896:2 clang-analyzer Value stored to '_tmp4__length1' is never read
tracker-sparql-query.c:7034:10 gcc unused-but-set-variable tracker_sparql_query_execute_insert_or_delete variable '_tmp115__length1' set but not used
tracker-sparql-query.c:7074:5 clang-analyzer Value stored to '_tmp115__length1' is never read
tracker-sparql-query.c:7534:3 clang-analyzer Value stored to 'is_null' is never read
tracker-sparql-query.c:9829:2 clang-analyzer Value stored to 'is_null' is never read
    1 /* tracker-sparql-query.c generated by valac 0.18.1, the Vala compiler
    2  * generated from tracker-sparql-query.vala, do not modify */
    3 
    4 /*
    5  * Copyright (C) 2008-2010, Nokia
    6  *
    7  * This library is free software; you can redistribute it and/or
    8  * modify it under the terms of the GNU Lesser General Public
    9  * License as published by the Free Software Foundation; either
   10  * version 2.1 of the License, or (at your option) any later version.
   11  *
   12  * This library is distributed in the hope that it will be useful,
   13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   15  * Lesser General Public License for more details.
   16  *
   17  * You should have received a copy of the GNU Lesser General Public
   18  * License along with this library; if not, write to the
   19  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   20  * Boston, MA  02110-1301, USA.
   21  */
   22 
   23 #include <glib.h>
   24 #include <glib-object.h>
   25 #include <stdlib.h>
   26 #include <string.h>
   27 #include "libtracker-data/tracker-property.h"
   28 #include "libtracker-data/tracker-class.h"
   29 #include "libtracker-data/tracker-data-query.h"
   30 #include "libtracker-data/tracker-data-update.h"
   31 #include "libtracker-data/tracker-data-backup.h"
   32 #include "libtracker-sparql/tracker-sparql.h"
   33 #include "libtracker-data/tracker-db-interface.h"
   34 #include "libtracker-common/tracker-date-time.h"
   35 #include "libtracker-data/tracker-ontologies.h"
   36 #include "libtracker-data/tracker-namespace.h"
   37 #include "libtracker-data/tracker-db-manager.h"
   38 #include <float.h>
   39 #include <math.h>
   40 #include <gobject/gvaluecollector.h>
   41 
   42 
   43 #define TRACKER_SPARQL_TYPE_VARIABLE_STATE (tracker_sparql_variable_state_get_type ())
   44 
   45 #define TRACKER_SPARQL_TYPE_DATA_TABLE (tracker_sparql_data_table_get_type ())
   46 #define TRACKER_SPARQL_DATA_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_DATA_TABLE, TrackerSparqlDataTable))
   47 #define TRACKER_SPARQL_DATA_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_DATA_TABLE, TrackerSparqlDataTableClass))
   48 #define TRACKER_SPARQL_IS_DATA_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_DATA_TABLE))
   49 #define TRACKER_SPARQL_IS_DATA_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_DATA_TABLE))
   50 #define TRACKER_SPARQL_DATA_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_DATA_TABLE, TrackerSparqlDataTableClass))
   51 
   52 typedef struct _TrackerSparqlDataTable TrackerSparqlDataTable;
   53 typedef struct _TrackerSparqlDataTableClass TrackerSparqlDataTableClass;
   54 typedef struct _TrackerSparqlDataTablePrivate TrackerSparqlDataTablePrivate;
   55 
   56 #define TRACKER_SPARQL_TYPE_PREDICATE_VARIABLE (tracker_sparql_predicate_variable_get_type ())
   57 #define TRACKER_SPARQL_PREDICATE_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_PREDICATE_VARIABLE, TrackerSparqlPredicateVariable))
   58 #define TRACKER_SPARQL_PREDICATE_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_PREDICATE_VARIABLE, TrackerSparqlPredicateVariableClass))
   59 #define TRACKER_SPARQL_IS_PREDICATE_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_PREDICATE_VARIABLE))
   60 #define TRACKER_SPARQL_IS_PREDICATE_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_PREDICATE_VARIABLE))
   61 #define TRACKER_SPARQL_PREDICATE_VARIABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_PREDICATE_VARIABLE, TrackerSparqlPredicateVariableClass))
   62 
   63 typedef struct _TrackerSparqlPredicateVariable TrackerSparqlPredicateVariable;
   64 typedef struct _TrackerSparqlPredicateVariableClass TrackerSparqlPredicateVariableClass;
   65 #define _g_free0(var) (var = (g_free (var), NULL))
   66 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
   67 
   68 #define TRACKER_SPARQL_TYPE_DATA_BINDING (tracker_sparql_data_binding_get_type ())
   69 #define TRACKER_SPARQL_DATA_BINDING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_DATA_BINDING, TrackerSparqlDataBinding))
   70 #define TRACKER_SPARQL_DATA_BINDING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_DATA_BINDING, TrackerSparqlDataBindingClass))
   71 #define TRACKER_SPARQL_IS_DATA_BINDING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_DATA_BINDING))
   72 #define TRACKER_SPARQL_IS_DATA_BINDING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_DATA_BINDING))
   73 #define TRACKER_SPARQL_DATA_BINDING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_DATA_BINDING, TrackerSparqlDataBindingClass))
   74 
   75 typedef struct _TrackerSparqlDataBinding TrackerSparqlDataBinding;
   76 typedef struct _TrackerSparqlDataBindingClass TrackerSparqlDataBindingClass;
   77 typedef struct _TrackerSparqlDataBindingPrivate TrackerSparqlDataBindingPrivate;
   78 
   79 #define TRACKER_SPARQL_TYPE_LITERAL_BINDING (tracker_sparql_literal_binding_get_type ())
   80 #define TRACKER_SPARQL_LITERAL_BINDING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_LITERAL_BINDING, TrackerSparqlLiteralBinding))
   81 #define TRACKER_SPARQL_LITERAL_BINDING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_LITERAL_BINDING, TrackerSparqlLiteralBindingClass))
   82 #define TRACKER_SPARQL_IS_LITERAL_BINDING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_LITERAL_BINDING))
   83 #define TRACKER_SPARQL_IS_LITERAL_BINDING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_LITERAL_BINDING))
   84 #define TRACKER_SPARQL_LITERAL_BINDING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_LITERAL_BINDING, TrackerSparqlLiteralBindingClass))
   85 
   86 typedef struct _TrackerSparqlLiteralBinding TrackerSparqlLiteralBinding;
   87 typedef struct _TrackerSparqlLiteralBindingClass TrackerSparqlLiteralBindingClass;
   88 typedef struct _TrackerSparqlLiteralBindingPrivate TrackerSparqlLiteralBindingPrivate;
   89 
   90 #define TRACKER_SPARQL_TYPE_VARIABLE_BINDING (tracker_sparql_variable_binding_get_type ())
   91 #define TRACKER_SPARQL_VARIABLE_BINDING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_VARIABLE_BINDING, TrackerSparqlVariableBinding))
   92 #define TRACKER_SPARQL_VARIABLE_BINDING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_VARIABLE_BINDING, TrackerSparqlVariableBindingClass))
   93 #define TRACKER_SPARQL_IS_VARIABLE_BINDING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_VARIABLE_BINDING))
   94 #define TRACKER_SPARQL_IS_VARIABLE_BINDING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_VARIABLE_BINDING))
   95 #define TRACKER_SPARQL_VARIABLE_BINDING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_VARIABLE_BINDING, TrackerSparqlVariableBindingClass))
   96 
   97 typedef struct _TrackerSparqlVariableBinding TrackerSparqlVariableBinding;
   98 typedef struct _TrackerSparqlVariableBindingClass TrackerSparqlVariableBindingClass;
   99 typedef struct _TrackerSparqlVariableBindingPrivate TrackerSparqlVariableBindingPrivate;
  100 
  101 #define TRACKER_SPARQL_TYPE_VARIABLE (tracker_sparql_variable_get_type ())
  102 #define TRACKER_SPARQL_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_VARIABLE, TrackerSparqlVariable))
  103 #define TRACKER_SPARQL_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_VARIABLE, TrackerSparqlVariableClass))
  104 #define TRACKER_SPARQL_IS_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_VARIABLE))
  105 #define TRACKER_SPARQL_IS_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_VARIABLE))
  106 #define TRACKER_SPARQL_VARIABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_VARIABLE, TrackerSparqlVariableClass))
  107 
  108 typedef struct _TrackerSparqlVariable TrackerSparqlVariable;
  109 typedef struct _TrackerSparqlVariableClass TrackerSparqlVariableClass;
  110 
  111 #define TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST (tracker_sparql_variable_binding_list_get_type ())
  112 #define TRACKER_SPARQL_VARIABLE_BINDING_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST, TrackerSparqlVariableBindingList))
  113 #define TRACKER_SPARQL_VARIABLE_BINDING_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST, TrackerSparqlVariableBindingListClass))
  114 #define TRACKER_SPARQL_IS_VARIABLE_BINDING_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST))
  115 #define TRACKER_SPARQL_IS_VARIABLE_BINDING_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST))
  116 #define TRACKER_SPARQL_VARIABLE_BINDING_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST, TrackerSparqlVariableBindingListClass))
  117 
  118 typedef struct _TrackerSparqlVariableBindingList TrackerSparqlVariableBindingList;
  119 typedef struct _TrackerSparqlVariableBindingListClass TrackerSparqlVariableBindingListClass;
  120 typedef struct _TrackerSparqlVariableBindingListPrivate TrackerSparqlVariableBindingListPrivate;
  121 #define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
  122 typedef struct _TrackerSparqlVariablePrivate TrackerSparqlVariablePrivate;
  123 
  124 #define TRACKER_SPARQL_TYPE_CONTEXT (tracker_sparql_context_get_type ())
  125 #define TRACKER_SPARQL_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_CONTEXT, TrackerSparqlContext))
  126 #define TRACKER_SPARQL_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_CONTEXT, TrackerSparqlContextClass))
  127 #define TRACKER_SPARQL_IS_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_CONTEXT))
  128 #define TRACKER_SPARQL_IS_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_CONTEXT))
  129 #define TRACKER_SPARQL_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_CONTEXT, TrackerSparqlContextClass))
  130 
  131 typedef struct _TrackerSparqlContext TrackerSparqlContext;
  132 typedef struct _TrackerSparqlContextClass TrackerSparqlContextClass;
  133 typedef struct _TrackerSparqlContextPrivate TrackerSparqlContextPrivate;
  134 
  135 #define TRACKER_SPARQL_TYPE_QUERY (tracker_sparql_query_get_type ())
  136 #define TRACKER_SPARQL_QUERY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_QUERY, TrackerSparqlQuery))
  137 #define TRACKER_SPARQL_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_QUERY, TrackerSparqlQueryClass))
  138 #define TRACKER_SPARQL_IS_QUERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_QUERY))
  139 #define TRACKER_SPARQL_IS_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_QUERY))
  140 #define TRACKER_SPARQL_QUERY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_QUERY, TrackerSparqlQueryClass))
  141 
  142 typedef struct _TrackerSparqlQuery TrackerSparqlQuery;
  143 typedef struct _TrackerSparqlQueryClass TrackerSparqlQueryClass;
  144 #define _tracker_sparql_context_unref0(var) ((var == NULL) ? NULL : (var = (tracker_sparql_context_unref (var), NULL)))
  145 #define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
  146 typedef struct _TrackerSparqlQueryPrivate TrackerSparqlQueryPrivate;
  147 
  148 #define TRACKER_SPARQL_TYPE_EXPRESSION (tracker_sparql_expression_get_type ())
  149 #define TRACKER_SPARQL_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_EXPRESSION, TrackerSparqlExpression))
  150 #define TRACKER_SPARQL_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_EXPRESSION, TrackerSparqlExpressionClass))
  151 #define TRACKER_SPARQL_IS_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_EXPRESSION))
  152 #define TRACKER_SPARQL_IS_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_EXPRESSION))
  153 #define TRACKER_SPARQL_EXPRESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_EXPRESSION, TrackerSparqlExpressionClass))
  154 
  155 typedef struct _TrackerSparqlExpression TrackerSparqlExpression;
  156 typedef struct _TrackerSparqlExpressionClass TrackerSparqlExpressionClass;
  157 
  158 #define TRACKER_SPARQL_TYPE_PATTERN (tracker_sparql_pattern_get_type ())
  159 #define TRACKER_SPARQL_PATTERN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_PATTERN, TrackerSparqlPattern))
  160 #define TRACKER_SPARQL_PATTERN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_PATTERN, TrackerSparqlPatternClass))
  161 #define TRACKER_SPARQL_IS_PATTERN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_PATTERN))
  162 #define TRACKER_SPARQL_IS_PATTERN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_PATTERN))
  163 #define TRACKER_SPARQL_PATTERN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_PATTERN, TrackerSparqlPatternClass))
  164 
  165 typedef struct _TrackerSparqlPattern TrackerSparqlPattern;
  166 typedef struct _TrackerSparqlPatternClass TrackerSparqlPatternClass;
  167 typedef struct _TrackerSparqlParamSpecContext TrackerSparqlParamSpecContext;
  168 
  169 #define TRACKER_SPARQL_TYPE_SELECT_CONTEXT (tracker_sparql_select_context_get_type ())
  170 #define TRACKER_SPARQL_SELECT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_SELECT_CONTEXT, TrackerSparqlSelectContext))
  171 #define TRACKER_SPARQL_SELECT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_SELECT_CONTEXT, TrackerSparqlSelectContextClass))
  172 #define TRACKER_SPARQL_IS_SELECT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_SELECT_CONTEXT))
  173 #define TRACKER_SPARQL_IS_SELECT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_SELECT_CONTEXT))
  174 #define TRACKER_SPARQL_SELECT_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_SELECT_CONTEXT, TrackerSparqlSelectContextClass))
  175 
  176 typedef struct _TrackerSparqlSelectContext TrackerSparqlSelectContext;
  177 typedef struct _TrackerSparqlSelectContextClass TrackerSparqlSelectContextClass;
  178 typedef struct _TrackerSparqlSelectContextPrivate TrackerSparqlSelectContextPrivate;
  179 
  180 #define TRACKER_SPARQL_TYPE_SOLUTION (tracker_sparql_solution_get_type ())
  181 #define TRACKER_SPARQL_SOLUTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_SOLUTION, TrackerSparqlSolution))
  182 #define TRACKER_SPARQL_SOLUTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_SOLUTION, TrackerSparqlSolutionClass))
  183 #define TRACKER_SPARQL_IS_SOLUTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_SOLUTION))
  184 #define TRACKER_SPARQL_IS_SOLUTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_SOLUTION))
  185 #define TRACKER_SPARQL_SOLUTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_SOLUTION, TrackerSparqlSolutionClass))
  186 
  187 typedef struct _TrackerSparqlSolution TrackerSparqlSolution;
  188 typedef struct _TrackerSparqlSolutionClass TrackerSparqlSolutionClass;
  189 typedef struct _TrackerSparqlSolutionPrivate TrackerSparqlSolutionPrivate;
  190 #define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))
  191 typedef struct _TrackerSparqlParamSpecSolution TrackerSparqlParamSpecSolution;
  192 
  193 #define TRACKER_TYPE_SPARQL_SCANNER (tracker_sparql_scanner_get_type ())
  194 #define TRACKER_SPARQL_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_TYPE_SPARQL_SCANNER, TrackerSparqlScanner))
  195 #define TRACKER_SPARQL_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_SPARQL_SCANNER, TrackerSparqlScannerClass))
  196 #define TRACKER_IS_SPARQL_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_TYPE_SPARQL_SCANNER))
  197 #define TRACKER_IS_SPARQL_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_SPARQL_SCANNER))
  198 #define TRACKER_SPARQL_SCANNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_SPARQL_SCANNER, TrackerSparqlScannerClass))
  199 
  200 typedef struct _TrackerSparqlScanner TrackerSparqlScanner;
  201 typedef struct _TrackerSparqlScannerClass TrackerSparqlScannerClass;
  202 
  203 #define TRACKER_SPARQL_QUERY_TYPE_TOKEN_INFO (tracker_sparql_query_token_info_get_type ())
  204 
  205 #define TRACKER_TYPE_SPARQL_TOKEN_TYPE (tracker_sparql_token_type_get_type ())
  206 
  207 #define TRACKER_TYPE_SOURCE_LOCATION (tracker_source_location_get_type ())
  208 typedef struct _TrackerSourceLocation TrackerSourceLocation;
  209 typedef struct _TrackerSparqlQueryTokenInfo TrackerSparqlQueryTokenInfo;
  210 #define _g_checksum_free0(var) ((var == NULL) ? NULL : (var = (g_checksum_free (var), NULL)))
  211 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
  212 #define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
  213 #define _g_variant_builder_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_builder_unref (var), NULL)))
  214 #define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
  215 typedef struct _TrackerSparqlPatternPrivate TrackerSparqlPatternPrivate;
  216 #define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
  217 #define _tracker_sparql_solution_unref0(var) ((var == NULL) ? NULL : (var = (tracker_sparql_solution_unref (var), NULL)))
  218 #define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
  219 
  220 typedef enum  {
  221 	TRACKER_SPARQL_VARIABLE_STATE_NONE,
  222 	TRACKER_SPARQL_VARIABLE_STATE_BOUND,
  223 	TRACKER_SPARQL_VARIABLE_STATE_OPTIONAL
  224 } TrackerSparqlVariableState;
  225 
  226 struct _TrackerSparqlDataTable {
  227 	GObject parent_instance;
  228 	TrackerSparqlDataTablePrivate * priv;
  229 	gchar* sql_db_tablename;
  230 	gchar* sql_query_tablename;
  231 	TrackerSparqlPredicateVariable* predicate_variable;
  232 };
  233 
  234 struct _TrackerSparqlDataTableClass {
  235 	GObjectClass parent_class;
  236 };
  237 
  238 struct _TrackerSparqlDataBinding {
  239 	GObject parent_instance;
  240 	TrackerSparqlDataBindingPrivate * priv;
  241 	TrackerPropertyType data_type;
  242 	TrackerSparqlDataTable* table;
  243 	gchar* sql_db_column_name;
  244 };
  245 
  246 struct _TrackerSparqlDataBindingClass {
  247 	GObjectClass parent_class;
  248 };
  249 
  250 struct _TrackerSparqlDataBindingPrivate {
  251 	gchar* _sql_expression;
  252 };
  253 
  254 struct _TrackerSparqlLiteralBinding {
  255 	TrackerSparqlDataBinding parent_instance;
  256 	TrackerSparqlLiteralBindingPrivate * priv;
  257 	gboolean is_fts_match;
  258 	gchar* literal;
  259 };
  260 
  261 struct _TrackerSparqlLiteralBindingClass {
  262 	TrackerSparqlDataBindingClass parent_class;
  263 };
  264 
  265 struct _TrackerSparqlVariableBinding {
  266 	TrackerSparqlDataBinding parent_instance;
  267 	TrackerSparqlVariableBindingPrivate * priv;
  268 	TrackerSparqlVariable* variable;
  269 	gboolean maybe_null;
  270 	gboolean in_simple_optional;
  271 	TrackerClass* type;
  272 };
  273 
  274 struct _TrackerSparqlVariableBindingClass {
  275 	TrackerSparqlDataBindingClass parent_class;
  276 };
  277 
  278 struct _TrackerSparqlVariableBindingList {
  279 	GObject parent_instance;
  280 	TrackerSparqlVariableBindingListPrivate * priv;
  281 	GList* list;
  282 };
  283 
  284 struct _TrackerSparqlVariableBindingListClass {
  285 	GObjectClass parent_class;
  286 };
  287 
  288 struct _TrackerSparqlVariable {
  289 	GObject parent_instance;
  290 	TrackerSparqlVariablePrivate * priv;
  291 	TrackerSparqlVariableBinding* binding;
  292 };
  293 
  294 struct _TrackerSparqlVariableClass {
  295 	GObjectClass parent_class;
  296 };
  297 
  298 struct _TrackerSparqlVariablePrivate {
  299 	gchar* _name;
  300 	gint _index;
  301 	gchar* _sql_expression;
  302 	gchar* sql_identifier;
  303 };
  304 
  305 struct _TrackerSparqlContext {
  306 	GTypeInstance parent_instance;
  307 	volatile int ref_count;
  308 	TrackerSparqlContextPrivate * priv;
  309 	TrackerSparqlQuery* query;
  310 	TrackerSparqlContext* parent_context;
  311 	GHashTable* var_set;
  312 	GHashTable* var_map;
  313 	GHashTable* select_var_set;
  314 	GHashTable* predicate_variable_map;
  315 	gboolean scalar_subquery;
  316 };
  317 
  318 struct _TrackerSparqlContextClass {
  319 	GTypeClass parent_class;
  320 	void (*finalize) (TrackerSparqlContext *self);
  321 };
  322 
  323 struct _TrackerSparqlQuery {
  324 	GObject parent_instance;
  325 	TrackerSparqlQueryPrivate * priv;
  326 	TrackerSparqlExpression* expression;
  327 	TrackerSparqlPattern* pattern;
  328 	GList* bindings;
  329 	TrackerSparqlContext* context;
  330 	gint last_var_index;
  331 };
  332 
  333 struct _TrackerSparqlQueryClass {
  334 	GObjectClass parent_class;
  335 };
  336 
  337 struct _TrackerSparqlParamSpecContext {
  338 	GParamSpec parent_instance;
  339 };
  340 
  341 struct _TrackerSparqlSelectContext {
  342 	TrackerSparqlContext parent_instance;
  343 	TrackerSparqlSelectContextPrivate * priv;
  344 	TrackerPropertyType type;
  345 	TrackerPropertyType* types;
  346 	gint types_length1;
  347 	gint _types_size_;
  348 	gchar** variable_names;
  349 	gint variable_names_length1;
  350 	gint _variable_names_size_;
  351 };
  352 
  353 struct _TrackerSparqlSelectContextClass {
  354 	TrackerSparqlContextClass parent_class;
  355 };
  356 
  357 struct _TrackerSparqlSolution {
  358 	GTypeInstance parent_instance;
  359 	volatile int ref_count;
  360 	TrackerSparqlSolutionPrivate * priv;
  361 	GHashTable* hash;
  362 	GPtrArray* values;
  363 	gint solution_index;
  364 };
  365 
  366 struct _TrackerSparqlSolutionClass {
  367 	GTypeClass parent_class;
  368 	void (*finalize) (TrackerSparqlSolution *self);
  369 };
  370 
  371 struct _TrackerSparqlParamSpecSolution {
  372 	GParamSpec parent_instance;
  373 };
  374 
  375 typedef enum  {
  376 	TRACKER_SPARQL_TOKEN_TYPE_NONE,
  377 	TRACKER_SPARQL_TOKEN_TYPE_A,
  378 	TRACKER_SPARQL_TOKEN_TYPE_AS,
  379 	TRACKER_SPARQL_TOKEN_TYPE_ASC,
  380 	TRACKER_SPARQL_TOKEN_TYPE_ASK,
  381 	TRACKER_SPARQL_TOKEN_TYPE_ATBASE,
  382 	TRACKER_SPARQL_TOKEN_TYPE_ATPREFIX,
  383 	TRACKER_SPARQL_TOKEN_TYPE_AVG,
  384 	TRACKER_SPARQL_TOKEN_TYPE_BASE,
  385 	TRACKER_SPARQL_TOKEN_TYPE_BLANK_NODE,
  386 	TRACKER_SPARQL_TOKEN_TYPE_BOUND,
  387 	TRACKER_SPARQL_TOKEN_TYPE_BY,
  388 	TRACKER_SPARQL_TOKEN_TYPE_CLOSE_BRACE,
  389 	TRACKER_SPARQL_TOKEN_TYPE_CLOSE_BRACKET,
  390 	TRACKER_SPARQL_TOKEN_TYPE_CLOSE_PARENS,
  391 	TRACKER_SPARQL_TOKEN_TYPE_COALESCE,
  392 	TRACKER_SPARQL_TOKEN_TYPE_COLON,
  393 	TRACKER_SPARQL_TOKEN_TYPE_COMMA,
  394 	TRACKER_SPARQL_TOKEN_TYPE_CONSTRUCT,
  395 	TRACKER_SPARQL_TOKEN_TYPE_COUNT,
  396 	TRACKER_SPARQL_TOKEN_TYPE_DATA,
syntax error
(emitted by cppcheck)
397 TRACKER_SPARQL_TOKEN_TYPE_DATATYPE, 398 TRACKER_SPARQL_TOKEN_TYPE_DECIMAL, 399 TRACKER_SPARQL_TOKEN_TYPE_DELETE, 400 TRACKER_SPARQL_TOKEN_TYPE_DESC, 401 TRACKER_SPARQL_TOKEN_TYPE_DESCRIBE, 402 TRACKER_SPARQL_TOKEN_TYPE_DISTINCT, 403 TRACKER_SPARQL_TOKEN_TYPE_DIV, 404 TRACKER_SPARQL_TOKEN_TYPE_DOT, 405 TRACKER_SPARQL_TOKEN_TYPE_DOUBLE, 406 TRACKER_SPARQL_TOKEN_TYPE_DOUBLE_CIRCUMFLEX, 407 TRACKER_SPARQL_TOKEN_TYPE_DROP, 408 TRACKER_SPARQL_TOKEN_TYPE_EOF, 409 TRACKER_SPARQL_TOKEN_TYPE_EXISTS, 410 TRACKER_SPARQL_TOKEN_TYPE_FALSE, 411 TRACKER_SPARQL_TOKEN_TYPE_FILTER, 412 TRACKER_SPARQL_TOKEN_TYPE_FROM, 413 TRACKER_SPARQL_TOKEN_TYPE_GRAPH, 414 TRACKER_SPARQL_TOKEN_TYPE_GROUP, 415 TRACKER_SPARQL_TOKEN_TYPE_GROUP_CONCAT, 416 TRACKER_SPARQL_TOKEN_TYPE_HAVING, 417 TRACKER_SPARQL_TOKEN_TYPE_IF, 418 TRACKER_SPARQL_TOKEN_TYPE_INSERT, 419 TRACKER_SPARQL_TOKEN_TYPE_INTEGER, 420 TRACKER_SPARQL_TOKEN_TYPE_INTO, 421 TRACKER_SPARQL_TOKEN_TYPE_IRI_REF, 422 TRACKER_SPARQL_TOKEN_TYPE_ISBLANK, 423 TRACKER_SPARQL_TOKEN_TYPE_ISIRI, 424 TRACKER_SPARQL_TOKEN_TYPE_ISLITERAL, 425 TRACKER_SPARQL_TOKEN_TYPE_ISURI, 426 TRACKER_SPARQL_TOKEN_TYPE_LANG, 427 TRACKER_SPARQL_TOKEN_TYPE_LANGMATCHES, 428 TRACKER_SPARQL_TOKEN_TYPE_LIMIT, 429 TRACKER_SPARQL_TOKEN_TYPE_MAX, 430 TRACKER_SPARQL_TOKEN_TYPE_MIN, 431 TRACKER_SPARQL_TOKEN_TYPE_MINUS, 432 TRACKER_SPARQL_TOKEN_TYPE_NAMED, 433 TRACKER_SPARQL_TOKEN_TYPE_NOT, 434 TRACKER_SPARQL_TOKEN_TYPE_NULL, 435 TRACKER_SPARQL_TOKEN_TYPE_OFFSET, 436 TRACKER_SPARQL_TOKEN_TYPE_OP_AND, 437 TRACKER_SPARQL_TOKEN_TYPE_OP_EQ, 438 TRACKER_SPARQL_TOKEN_TYPE_OP_GE, 439 TRACKER_SPARQL_TOKEN_TYPE_OP_GT, 440 TRACKER_SPARQL_TOKEN_TYPE_OP_LE, 441 TRACKER_SPARQL_TOKEN_TYPE_OP_LT, 442 TRACKER_SPARQL_TOKEN_TYPE_OP_NE, 443 TRACKER_SPARQL_TOKEN_TYPE_OP_NEG, 444 TRACKER_SPARQL_TOKEN_TYPE_OP_OR, 445 TRACKER_SPARQL_TOKEN_TYPE_OP_IN, 446 TRACKER_SPARQL_TOKEN_TYPE_OPEN_BRACE, 447 TRACKER_SPARQL_TOKEN_TYPE_OPEN_BRACKET, 448 TRACKER_SPARQL_TOKEN_TYPE_OPEN_PARENS, 449 TRACKER_SPARQL_TOKEN_TYPE_OPTIONAL, 450 TRACKER_SPARQL_TOKEN_TYPE_OR, 451 TRACKER_SPARQL_TOKEN_TYPE_ORDER, 452 TRACKER_SPARQL_TOKEN_TYPE_PLUS, 453 TRACKER_SPARQL_TOKEN_TYPE_PN_PREFIX, 454 TRACKER_SPARQL_TOKEN_TYPE_PREFIX, 455 TRACKER_SPARQL_TOKEN_TYPE_REDUCED, 456 TRACKER_SPARQL_TOKEN_TYPE_REGEX, 457 TRACKER_SPARQL_TOKEN_TYPE_REPLACE, 458 TRACKER_SPARQL_TOKEN_TYPE_SAMETERM, 459 TRACKER_SPARQL_TOKEN_TYPE_SELECT, 460 TRACKER_SPARQL_TOKEN_TYPE_SEMICOLON, 461 TRACKER_SPARQL_TOKEN_TYPE_SILENT, 462 TRACKER_SPARQL_TOKEN_TYPE_STAR, 463 TRACKER_SPARQL_TOKEN_TYPE_STR, 464 TRACKER_SPARQL_TOKEN_TYPE_STRING_LITERAL1, 465 TRACKER_SPARQL_TOKEN_TYPE_STRING_LITERAL2, 466 TRACKER_SPARQL_TOKEN_TYPE_STRING_LITERAL_LONG1, 467 TRACKER_SPARQL_TOKEN_TYPE_STRING_LITERAL_LONG2, 468 TRACKER_SPARQL_TOKEN_TYPE_SUM, 469 TRACKER_SPARQL_TOKEN_TYPE_TRUE, 470 TRACKER_SPARQL_TOKEN_TYPE_UNION, 471 TRACKER_SPARQL_TOKEN_TYPE_VAR, 472 TRACKER_SPARQL_TOKEN_TYPE_WHERE, 473 TRACKER_SPARQL_TOKEN_TYPE_WITH 474 } TrackerSparqlTokenType; 475 476 struct _TrackerSourceLocation { 477 gchar* pos; 478 gint line; 479 gint column; 480 }; 481 482 struct _TrackerSparqlQueryTokenInfo { 483 TrackerSparqlTokenType type; 484 TrackerSourceLocation begin; 485 TrackerSourceLocation end; 486 }; 487 488 struct _TrackerSparqlQueryPrivate { 489 TrackerSparqlScanner* scanner; 490 TrackerSparqlQueryTokenInfo* tokens; 491 gint tokens_length1; 492 gint _tokens_size_; 493 gint index; 494 gint size; 495 gchar* query_string; 496 gboolean update_extensions; 497 gchar* current_graph; 498 gchar* current_subject; 499 gboolean current_subject_is_var; 500 gchar* current_predicate; 501 gboolean current_predicate_is_var; 502 gboolean silent; 503 GHashTable* prefix_map; 504 gboolean delete_statements; 505 gboolean update_statements; 506 gint bnodeid; 507 guchar* base_uuid; 508 gint base_uuid_length1; 509 gint _base_uuid_size_; 510 GHashTable* blank_nodes; 511 gboolean _no_cache; 512 gboolean anon_blank_node_open; 513 }; 514 515 struct _TrackerSparqlPattern { 516 GObject parent_instance; 517 TrackerSparqlPatternPrivate * priv; 518 gchar* current_graph; 519 TrackerSparqlVariable* fts_subject; 520 gchar** fts_variables; 521 gint fts_variables_length1; 522 gint _fts_variables_size_; 523 GString* match_str; 524 gboolean queries_fts_data; 525 }; 526 527 struct _TrackerSparqlPatternClass { 528 GObjectClass parent_class; 529 }; 530 531 532 static gpointer tracker_sparql_data_table_parent_class = NULL; 533 static gpointer tracker_sparql_data_binding_parent_class = NULL; 534 static gpointer tracker_sparql_literal_binding_parent_class = NULL; 535 static gpointer tracker_sparql_variable_binding_parent_class = NULL; 536 static gpointer tracker_sparql_variable_binding_list_parent_class = NULL; 537 static gpointer tracker_sparql_variable_parent_class = NULL; 538 static gpointer tracker_sparql_context_parent_class = NULL; 539 static gpointer tracker_sparql_select_context_parent_class = NULL; 540 static gpointer tracker_sparql_solution_parent_class = NULL; 541 static gpointer tracker_sparql_query_parent_class = NULL; 542 543 GType tracker_sparql_variable_state_get_type (void) G_GNUC_CONST; 544 GType tracker_sparql_data_table_get_type (void) G_GNUC_CONST; 545 GType tracker_sparql_predicate_variable_get_type (void) G_GNUC_CONST; 546 enum { 547 TRACKER_SPARQL_DATA_TABLE_DUMMY_PROPERTY 548 }; 549 TrackerSparqlDataTable* tracker_sparql_data_table_new (void); 550 TrackerSparqlDataTable* tracker_sparql_data_table_construct (GType object_type); 551 static void tracker_sparql_data_table_finalize (GObject* obj); 552 GType tracker_sparql_data_binding_get_type (void) G_GNUC_CONST; 553 #define TRACKER_SPARQL_DATA_BINDING_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_SPARQL_TYPE_DATA_BINDING, TrackerSparqlDataBindingPrivate)) 554 enum { 555 TRACKER_SPARQL_DATA_BINDING_DUMMY_PROPERTY, 556 TRACKER_SPARQL_DATA_BINDING_SQL_EXPRESSION 557 }; 558 gchar* tracker_sparql_data_binding_get_extra_sql_expression (TrackerSparqlDataBinding* self, const gchar* suffix); 559 TrackerSparqlDataBinding* tracker_sparql_data_binding_construct (GType object_type); 560 const gchar* tracker_sparql_data_binding_get_sql_expression (TrackerSparqlDataBinding* self); 561 void tracker_sparql_data_binding_set_sql_expression (TrackerSparqlDataBinding* self, const gchar* value); 562 static void tracker_sparql_data_binding_finalize (GObject* obj); 563 static void _vala_tracker_sparql_data_binding_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); 564 static void _vala_tracker_sparql_data_binding_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); 565 GType tracker_sparql_literal_binding_get_type (void) G_GNUC_CONST; 566 enum { 567 TRACKER_SPARQL_LITERAL_BINDING_DUMMY_PROPERTY 568 }; 569 TrackerSparqlLiteralBinding* tracker_sparql_literal_binding_new (void); 570 TrackerSparqlLiteralBinding* tracker_sparql_literal_binding_construct (GType object_type); 571 static void tracker_sparql_literal_binding_finalize (GObject* obj); 572 GType tracker_sparql_variable_binding_get_type (void) G_GNUC_CONST; 573 GType tracker_sparql_variable_get_type (void) G_GNUC_CONST; 574 enum { 575 TRACKER_SPARQL_VARIABLE_BINDING_DUMMY_PROPERTY 576 }; 577 TrackerSparqlVariableBinding* tracker_sparql_variable_binding_new (void); 578 TrackerSparqlVariableBinding* tracker_sparql_variable_binding_construct (GType object_type); 579 static void tracker_sparql_variable_binding_finalize (GObject* obj); 580 GType tracker_sparql_variable_binding_list_get_type (void) G_GNUC_CONST; 581 enum { 582 TRACKER_SPARQL_VARIABLE_BINDING_LIST_DUMMY_PROPERTY 583 }; 584 static void _g_object_unref0_ (gpointer var); 585 static void _g_list_free__g_object_unref0_ (GList* self); 586 TrackerSparqlVariableBindingList* tracker_sparql_variable_binding_list_new (void); 587 TrackerSparqlVariableBindingList* tracker_sparql_variable_binding_list_construct (GType object_type); 588 static void tracker_sparql_variable_binding_list_finalize (GObject* obj); 589 #define TRACKER_SPARQL_VARIABLE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_SPARQL_TYPE_VARIABLE, TrackerSparqlVariablePrivate)) 590 enum { 591 TRACKER_SPARQL_VARIABLE_DUMMY_PROPERTY, 592 TRACKER_SPARQL_VARIABLE_NAME, 593 TRACKER_SPARQL_VARIABLE_INDEX, 594 TRACKER_SPARQL_VARIABLE_SQL_EXPRESSION 595 }; 596 TrackerSparqlVariable* tracker_sparql_variable_new (const gchar* name, gint index); 597 TrackerSparqlVariable* tracker_sparql_variable_construct (GType object_type, const gchar* name, gint index); 598 static void tracker_sparql_variable_set_name (TrackerSparqlVariable* self, const gchar* value); 599 static void tracker_sparql_variable_set_index (TrackerSparqlVariable* self, gint value); 600 static void tracker_sparql_variable_set_sql_expression (TrackerSparqlVariable* self, const gchar* value); 601 gchar* tracker_sparql_variable_get_extra_sql_expression (TrackerSparqlVariable* self, const gchar* suffix); 602 gboolean tracker_sparql_variable_equal (TrackerSparqlVariable* a, TrackerSparqlVariable* b); 603 gint tracker_sparql_variable_get_index (TrackerSparqlVariable* self); 604 guint tracker_sparql_variable_hash (TrackerSparqlVariable* variable); 605 const gchar* tracker_sparql_variable_get_name (TrackerSparqlVariable* self); 606 const gchar* tracker_sparql_variable_get_sql_expression (TrackerSparqlVariable* self); 607 static void tracker_sparql_variable_finalize (GObject* obj); 608 static void _vala_tracker_sparql_variable_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); 609 static void _vala_tracker_sparql_variable_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); 610 gpointer tracker_sparql_context_ref (gpointer instance); 611 void tracker_sparql_context_unref (gpointer instance); 612 GParamSpec* tracker_sparql_param_spec_context (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); 613 void tracker_sparql_value_set_context (GValue* value, gpointer v_object); 614 void tracker_sparql_value_take_context (GValue* value, gpointer v_object); 615 gpointer tracker_sparql_value_get_context (const GValue* value); 616 GType tracker_sparql_context_get_type (void) G_GNUC_CONST; 617 GType tracker_sparql_query_get_type (void) G_GNUC_CONST; 618 enum { 619 TRACKER_SPARQL_CONTEXT_DUMMY_PROPERTY 620 }; 621 TrackerSparqlContext* tracker_sparql_context_new (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context); 622 TrackerSparqlContext* tracker_sparql_context_construct (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context); 623 static guint _tracker_sparql_variable_hash_ghash_func (gconstpointer key); 624 static gboolean _tracker_sparql_variable_equal_gequal_func (gconstpointer a, gconstpointer b); 625 TrackerSparqlContext* tracker_sparql_context_new_subquery (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context); 626 TrackerSparqlContext* tracker_sparql_context_construct_subquery (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context); 627 TrackerSparqlVariable* tracker_sparql_context_get_variable (TrackerSparqlContext* self, const gchar* name); 628 GType tracker_sparql_expression_get_type (void) G_GNUC_CONST; 629 GType tracker_sparql_pattern_get_type (void) G_GNUC_CONST; 630 static void tracker_sparql_context_finalize (TrackerSparqlContext* obj); 631 GType tracker_sparql_select_context_get_type (void) G_GNUC_CONST; 632 enum { 633 TRACKER_SPARQL_SELECT_CONTEXT_DUMMY_PROPERTY 634 }; 635 TrackerSparqlSelectContext* tracker_sparql_select_context_new (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context); 636 TrackerSparqlSelectContext* tracker_sparql_select_context_construct (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context); 637 TrackerSparqlSelectContext* tracker_sparql_select_context_new_subquery (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context); 638 TrackerSparqlSelectContext* tracker_sparql_select_context_construct_subquery (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context); 639 static void tracker_sparql_select_context_finalize (TrackerSparqlContext* obj); 640 gpointer tracker_sparql_solution_ref (gpointer instance); 641 void tracker_sparql_solution_unref (gpointer instance); 642 GParamSpec* tracker_sparql_param_spec_solution (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); 643 void tracker_sparql_value_set_solution (GValue* value, gpointer v_object); 644 void tracker_sparql_value_take_solution (GValue* value, gpointer v_object); 645 gpointer tracker_sparql_value_get_solution (const GValue* value); 646 GType tracker_sparql_solution_get_type (void) G_GNUC_CONST; 647 enum { 648 TRACKER_SPARQL_SOLUTION_DUMMY_PROPERTY 649 }; 650 TrackerSparqlSolution* tracker_sparql_solution_new (void); 651 TrackerSparqlSolution* tracker_sparql_solution_construct (GType object_type); 652 static void _g_free0_ (gpointer var); 653 gchar* tracker_sparql_solution_lookup (TrackerSparqlSolution* self, const gchar* variable_name); 654 static void tracker_sparql_solution_finalize (TrackerSparqlSolution* obj); 655 GType tracker_sparql_scanner_get_type (void) G_GNUC_CONST; 656 static GType tracker_sparql_query_token_info_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; 657 GType tracker_sparql_token_type_get_type (void) G_GNUC_CONST; 658 GType tracker_source_location_get_type (void) G_GNUC_CONST; 659 TrackerSourceLocation* tracker_source_location_dup (const TrackerSourceLocation* self); 660 void tracker_source_location_free (TrackerSourceLocation* self); 661 static TrackerSparqlQueryTokenInfo* tracker_sparql_query_token_info_dup (const TrackerSparqlQueryTokenInfo* self); 662 static void tracker_sparql_query_token_info_free (TrackerSparqlQueryTokenInfo* self); 663 #define TRACKER_SPARQL_QUERY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_SPARQL_TYPE_QUERY, TrackerSparqlQueryPrivate)) 664 enum { 665 TRACKER_SPARQL_QUERY_DUMMY_PROPERTY, 666 TRACKER_SPARQL_QUERY_NO_CACHE 667 }; 668 #define TRACKER_SPARQL_QUERY_BUFFER_SIZE 32 669 #define TRACKER_SPARQL_QUERY_FN_NS "http://www.w3.org/2005/xpath-functions#" 670 TrackerSparqlQuery* tracker_sparql_query_new (const gchar* query); 671 TrackerSparqlQuery* tracker_sparql_query_construct (GType object_type, const gchar* query); 672 void tracker_sparql_query_set_no_cache (TrackerSparqlQuery* self, gboolean value); 673 void uuid_generate (guchar* uuid); 674 TrackerSparqlExpression* tracker_sparql_expression_new (TrackerSparqlQuery* query); 675 TrackerSparqlExpression* tracker_sparql_expression_construct (GType object_type, TrackerSparqlQuery* query); 676 TrackerSparqlPattern* tracker_sparql_pattern_new (TrackerSparqlQuery* query); 677 TrackerSparqlPattern* tracker_sparql_pattern_construct (GType object_type, TrackerSparqlQuery* query); 678 TrackerSparqlQuery* tracker_sparql_query_new_update (const gchar* query); 679 TrackerSparqlQuery* tracker_sparql_query_construct_update (GType object_type, const gchar* query); 680 static gchar* tracker_sparql_query_get_uuid_for_name (TrackerSparqlQuery* self, guchar* base_uuid, int base_uuid_length1, const gchar* name); 681 gchar* tracker_sparql_query_generate_bnodeid (TrackerSparqlQuery* self, const gchar* user_bnodeid); 682 gboolean tracker_sparql_query_next (TrackerSparqlQuery* self, GError** error); 683 TrackerSparqlTokenType tracker_sparql_scanner_read_token (TrackerSparqlScanner* self, TrackerSourceLocation* token_begin, TrackerSourceLocation* token_end, GError** error); 684 TrackerSparqlTokenType tracker_sparql_query_current (TrackerSparqlQuery* self); 685 TrackerSparqlTokenType tracker_sparql_query_last (TrackerSparqlQuery* self); 686 gboolean tracker_sparql_query_accept (TrackerSparqlQuery* self, TrackerSparqlTokenType type, GError** error); 687 GError* tracker_sparql_query_get_error (TrackerSparqlQuery* self, const gchar* msg); 688 GError* tracker_sparql_query_get_internal_error (TrackerSparqlQuery* self, const gchar* msg); 689 gboolean tracker_sparql_query_expect (TrackerSparqlQuery* self, TrackerSparqlTokenType type, GError** error); 690 const gchar* tracker_sparql_token_type_to_string (TrackerSparqlTokenType self); 691 void tracker_sparql_query_get_location (TrackerSparqlQuery* self, TrackerSourceLocation* result); 692 void tracker_sparql_query_set_location (TrackerSparqlQuery* self, TrackerSourceLocation* location); 693 void tracker_sparql_scanner_seek (TrackerSparqlScanner* self, TrackerSourceLocation* location); 694 gchar* tracker_sparql_query_get_last_string (TrackerSparqlQuery* self, gint strip); 695 static void tracker_sparql_query_parse_prologue (TrackerSparqlQuery* self, GError** error); 696 static void tracker_sparql_query_prepare_execute (TrackerSparqlQuery* self, GError** error); 697 TrackerSparqlScanner* tracker_sparql_scanner_new (gchar* input, gsize len); 698 TrackerSparqlScanner* tracker_sparql_scanner_construct (GType object_type, gchar* input, gsize len); 699 TrackerDBCursor* tracker_sparql_query_execute_cursor (TrackerSparqlQuery* self, gboolean threadsafe, GError** error); 700 static TrackerDBCursor* tracker_sparql_query_execute_select_cursor (TrackerSparqlQuery* self, gboolean threadsafe, GError** error); 701 static TrackerDBCursor* tracker_sparql_query_execute_ask_cursor (TrackerSparqlQuery* self, gboolean threadsafe, GError** error); 702 GVariant* tracker_sparql_query_execute_update (TrackerSparqlQuery* self, gboolean blank, GError** error); 703 static void tracker_sparql_query_execute_insert_or_delete (TrackerSparqlQuery* self, GVariantBuilder* update_blank_nodes, GError** error); 704 static TrackerDBStatement* tracker_sparql_query_prepare_for_exec (TrackerSparqlQuery* self, const gchar* sql, GError** error); 705 gboolean tracker_sparql_query_get_no_cache (TrackerSparqlQuery* self); 706 static TrackerDBCursor* tracker_sparql_query_exec_sql_cursor (TrackerSparqlQuery* self, const gchar* sql, TrackerPropertyType* types, int types_length1, gchar** variable_names, int variable_names_length1, gboolean threadsafe, GError** error); 707 static gchar* tracker_sparql_query_get_select_query (TrackerSparqlQuery* self, TrackerSparqlSelectContext** context, GError** error); 708 TrackerSparqlSelectContext* tracker_sparql_pattern_translate_select (TrackerSparqlPattern* self, GString* sql, gboolean subquery, gboolean scalar_subquery, GError** error); 709 static gchar* tracker_sparql_query_get_ask_query (TrackerSparqlQuery* self, GError** error); 710 TrackerSparqlContext* tracker_sparql_pattern_translate_group_graph_pattern (TrackerSparqlPattern* self, GString* sql, GError** error); 711 static void tracker_sparql_query_parse_from_or_into_param (TrackerSparqlQuery* self, GError** error); 712 gchar* tracker_sparql_query_resolve_prefixed_name (TrackerSparqlQuery* self, const gchar* prefix, const gchar* local_name, GError** error); 713 static void tracker_sparql_query_skip_braces (TrackerSparqlQuery* self, GError** error); 714 void tracker_sparql_expression_append_expression_as_string (GString* sql, const gchar* expression, TrackerPropertyType type); 715 static void tracker_sparql_query_parse_construct_triples_block (TrackerSparqlQuery* self, TrackerSparqlSolution* var_value_map, GError** error); 716 static GVariant* _variant_new1 (GHashTable* value); 717 static gchar* tracker_sparql_query_parse_construct_var_or_term (TrackerSparqlQuery* self, TrackerSparqlSolution* var_value_map, gboolean* is_null, GError** error); 718 static void tracker_sparql_query_parse_construct_property_list_not_empty (TrackerSparqlQuery* self, TrackerSparqlSolution* var_value_map, GError** error); 719 gchar* tracker_sparql_expression_parse_string_literal (TrackerSparqlExpression* self, TrackerPropertyType* type, GError** error); 720 static void tracker_sparql_query_parse_construct_object_list (TrackerSparqlQuery* self, TrackerSparqlSolution* var_value_map, GError** error); 721 static void tracker_sparql_query_parse_construct_object (TrackerSparqlQuery* self, TrackerSparqlSolution* var_value_map, GError** error); 722 static void tracker_sparql_query_finalize (GObject* obj); 723 static void _vala_tracker_sparql_query_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); 724 static void _vala_tracker_sparql_query_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); 725 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); 726 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); 727 728 729 GType tracker_sparql_variable_state_get_type (void) { 730 static volatile gsize tracker_sparql_variable_state_type_id__volatile = 0; 731 if (g_once_init_enter (&tracker_sparql_variable_state_type_id__volatile)) { 732 static const GEnumValue values[] = {{TRACKER_SPARQL_VARIABLE_STATE_NONE, "TRACKER_SPARQL_VARIABLE_STATE_NONE", "none"}, {TRACKER_SPARQL_VARIABLE_STATE_BOUND, "TRACKER_SPARQL_VARIABLE_STATE_BOUND", "bound"}, {TRACKER_SPARQL_VARIABLE_STATE_OPTIONAL, "TRACKER_SPARQL_VARIABLE_STATE_OPTIONAL", "optional"}, {0, NULL, NULL}}; 733 GType tracker_sparql_variable_state_type_id; 734 tracker_sparql_variable_state_type_id = g_enum_register_static ("TrackerSparqlVariableState", values); 735 g_once_init_leave (&tracker_sparql_variable_state_type_id__volatile, tracker_sparql_variable_state_type_id); 736 } 737 return tracker_sparql_variable_state_type_id__volatile; 738 } 739 740 741 TrackerSparqlDataTable* tracker_sparql_data_table_construct (GType object_type) { 742 TrackerSparqlDataTable * self = NULL; 743 #line 28 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 744 self = (TrackerSparqlDataTable*) g_object_new (object_type, NULL); 745 #line 28 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 746 return self; 747 #line 748 "tracker-sparql-query.c" 748 } 749 750 751 TrackerSparqlDataTable* tracker_sparql_data_table_new (void) { 752 #line 28 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 753 return tracker_sparql_data_table_construct (TRACKER_SPARQL_TYPE_DATA_TABLE); 754 #line 755 "tracker-sparql-query.c" 755 } 756 757 758 static void tracker_sparql_data_table_class_init (TrackerSparqlDataTableClass * klass) { 759 #line 28 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 760 tracker_sparql_data_table_parent_class = g_type_class_peek_parent (klass); 761 #line 28 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 762 G_OBJECT_CLASS (klass)->finalize = tracker_sparql_data_table_finalize; 763 #line 764 "tracker-sparql-query.c" 764 } 765 766 767 static void tracker_sparql_data_table_instance_init (TrackerSparqlDataTable * self) { 768 } 769 770 771 static void tracker_sparql_data_table_finalize (GObject* obj) { 772 TrackerSparqlDataTable * self; 773 #line 28 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 774 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_DATA_TABLE, TrackerSparqlDataTable); 775 #line 29 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 776 _g_free0 (self->sql_db_tablename); 777 #line 30 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 778 _g_free0 (self->sql_query_tablename); 779 #line 31 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 780 _g_object_unref0 (self->predicate_variable); 781 #line 28 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 782 G_OBJECT_CLASS (tracker_sparql_data_table_parent_class)->finalize (obj); 783 #line 784 "tracker-sparql-query.c" 784 } 785 786 787 GType tracker_sparql_data_table_get_type (void) { 788 static volatile gsize tracker_sparql_data_table_type_id__volatile = 0; 789 if (g_once_init_enter (&tracker_sparql_data_table_type_id__volatile)) { 790 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlDataTableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_data_table_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlDataTable), 0, (GInstanceInitFunc) tracker_sparql_data_table_instance_init, NULL }; 791 GType tracker_sparql_data_table_type_id; 792 tracker_sparql_data_table_type_id = g_type_register_static (G_TYPE_OBJECT, "TrackerSparqlDataTable", &g_define_type_info, 0); 793 g_once_init_leave (&tracker_sparql_data_table_type_id__volatile, tracker_sparql_data_table_type_id); 794 } 795 return tracker_sparql_data_table_type_id__volatile; 796 } 797 798 799 gchar* tracker_sparql_data_binding_get_extra_sql_expression (TrackerSparqlDataBinding* self, const gchar* suffix) { 800 gchar* result = NULL; 801 TrackerSparqlDataTable* _tmp0_; 802 const gchar* _tmp1_; 803 const gchar* _tmp2_; 804 const gchar* _tmp3_; 805 gchar* _tmp4_ = NULL; 806 #line 50 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 807 g_return_val_if_fail (self != NULL, NULL); 808 #line 50 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 809 g_return_val_if_fail (suffix != NULL, NULL); 810 #line 51 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 811 _tmp0_ = self->table; 812 #line 51 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 813 _tmp1_ = _tmp0_->sql_query_tablename; 814 #line 51 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 815 _tmp2_ = self->sql_db_column_name; 816 #line 51 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 817 _tmp3_ = suffix; 818 #line 51 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 819 _tmp4_ = g_strdup_printf ("\"%s\".\"%s:%s\"", _tmp1_, _tmp2_, _tmp3_); 820 #line 51 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 821 result = _tmp4_; 822 #line 51 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 823 return result; 824 #line 825 "tracker-sparql-query.c" 825 } 826 827 828 TrackerSparqlDataBinding* tracker_sparql_data_binding_construct (GType object_type) { 829 TrackerSparqlDataBinding * self = NULL; 830 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 831 self = (TrackerSparqlDataBinding*) g_object_new (object_type, NULL); 832 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 833 return self; 834 #line 835 "tracker-sparql-query.c" 835 } 836 837 838 const gchar* tracker_sparql_data_binding_get_sql_expression (TrackerSparqlDataBinding* self) { 839 const gchar* result; 840 const gchar* _tmp0_; 841 const gchar* _tmp5_; 842 #line 39 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 843 g_return_val_if_fail (self != NULL, NULL); 844 #line 40 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 845 _tmp0_ = self->priv->_sql_expression; 846 #line 40 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 847 if (_tmp0_ == NULL) { 848 #line 849 "tracker-sparql-query.c" 849 TrackerSparqlDataTable* _tmp1_; 850 const gchar* _tmp2_; 851 const gchar* _tmp3_; 852 gchar* _tmp4_ = NULL; 853 #line 41 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 854 _tmp1_ = self->table; 855 #line 41 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 856 _tmp2_ = _tmp1_->sql_query_tablename; 857 #line 41 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 858 _tmp3_ = self->sql_db_column_name; 859 #line 41 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 860 _tmp4_ = g_strdup_printf ("\"%s\".\"%s\"", _tmp2_, _tmp3_); 861 #line 41 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 862 _g_free0 (self->priv->_sql_expression); 863 #line 41 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 864 self->priv->_sql_expression = _tmp4_; 865 #line 866 "tracker-sparql-query.c" 866 } 867 #line 43 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 868 _tmp5_ = self->priv->_sql_expression; 869 #line 43 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 870 result = _tmp5_; 871 #line 43 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 872 return result; 873 #line 874 "tracker-sparql-query.c" 874 } 875 876 877 void tracker_sparql_data_binding_set_sql_expression (TrackerSparqlDataBinding* self, const gchar* value) { 878 const gchar* _tmp0_; 879 gchar* _tmp1_; 880 #line 45 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 881 g_return_if_fail (self != NULL); 882 #line 46 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 883 _tmp0_ = value; 884 #line 46 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 885 _tmp1_ = g_strdup (_tmp0_); 886 #line 46 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 887 _g_free0 (self->priv->_sql_expression); 888 #line 46 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 889 self->priv->_sql_expression = _tmp1_; 890 #line 45 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 891 g_object_notify ((GObject *) self, "sql-expression"); 892 #line 893 "tracker-sparql-query.c" 893 } 894 895 896 static void tracker_sparql_data_binding_class_init (TrackerSparqlDataBindingClass * klass) { 897 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 898 tracker_sparql_data_binding_parent_class = g_type_class_peek_parent (klass); 899 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 900 g_type_class_add_private (klass, sizeof (TrackerSparqlDataBindingPrivate)); 901 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 902 G_OBJECT_CLASS (klass)->get_property = _vala_tracker_sparql_data_binding_get_property; 903 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 904 G_OBJECT_CLASS (klass)->set_property = _vala_tracker_sparql_data_binding_set_property; 905 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 906 G_OBJECT_CLASS (klass)->finalize = tracker_sparql_data_binding_finalize; 907 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 908 g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_SPARQL_DATA_BINDING_SQL_EXPRESSION, g_param_spec_string ("sql-expression", "sql-expression", "sql-expression", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); 909 #line 910 "tracker-sparql-query.c" 910 } 911 912 913 static void tracker_sparql_data_binding_instance_init (TrackerSparqlDataBinding * self) { 914 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 915 self->priv = TRACKER_SPARQL_DATA_BINDING_GET_PRIVATE (self); 916 #line 917 "tracker-sparql-query.c" 917 } 918 919 920 static void tracker_sparql_data_binding_finalize (GObject* obj) { 921 TrackerSparqlDataBinding * self; 922 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 923 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_DATA_BINDING, TrackerSparqlDataBinding); 924 #line 36 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 925 _g_object_unref0 (self->table); 926 #line 37 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 927 _g_free0 (self->sql_db_column_name); 928 #line 49 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 929 _g_free0 (self->priv->_sql_expression); 930 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 931 G_OBJECT_CLASS (tracker_sparql_data_binding_parent_class)->finalize (obj); 932 #line 933 "tracker-sparql-query.c" 933 } 934 935 936 GType tracker_sparql_data_binding_get_type (void) { 937 static volatile gsize tracker_sparql_data_binding_type_id__volatile = 0; 938 if (g_once_init_enter (&tracker_sparql_data_binding_type_id__volatile)) { 939 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlDataBindingClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_data_binding_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlDataBinding), 0, (GInstanceInitFunc) tracker_sparql_data_binding_instance_init, NULL }; 940 GType tracker_sparql_data_binding_type_id; 941 tracker_sparql_data_binding_type_id = g_type_register_static (G_TYPE_OBJECT, "TrackerSparqlDataBinding", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); 942 g_once_init_leave (&tracker_sparql_data_binding_type_id__volatile, tracker_sparql_data_binding_type_id); 943 } 944 return tracker_sparql_data_binding_type_id__volatile; 945 } 946 947 948 static void _vala_tracker_sparql_data_binding_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { 949 TrackerSparqlDataBinding * self; 950 self = G_TYPE_CHECK_INSTANCE_CAST (object, TRACKER_SPARQL_TYPE_DATA_BINDING, TrackerSparqlDataBinding); 951 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 952 switch (property_id) { 953 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 954 case TRACKER_SPARQL_DATA_BINDING_SQL_EXPRESSION: 955 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 956 g_value_set_string (value, tracker_sparql_data_binding_get_sql_expression (self)); 957 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 958 break; 959 #line 960 "tracker-sparql-query.c" 960 default: 961 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 962 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); 963 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 964 break; 965 #line 966 "tracker-sparql-query.c" 966 } 967 } 968 969 970 static void _vala_tracker_sparql_data_binding_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { 971 TrackerSparqlDataBinding * self; 972 self = G_TYPE_CHECK_INSTANCE_CAST (object, TRACKER_SPARQL_TYPE_DATA_BINDING, TrackerSparqlDataBinding); 973 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 974 switch (property_id) { 975 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 976 case TRACKER_SPARQL_DATA_BINDING_SQL_EXPRESSION: 977 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 978 tracker_sparql_data_binding_set_sql_expression (self, g_value_get_string (value)); 979 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 980 break; 981 #line 982 "tracker-sparql-query.c" 982 default: 983 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 984 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); 985 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 986 break; 987 #line 988 "tracker-sparql-query.c" 988 } 989 } 990 991 992 TrackerSparqlLiteralBinding* tracker_sparql_literal_binding_construct (GType object_type) { 993 TrackerSparqlLiteralBinding * self = NULL; 994 #line 56 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 995 self = (TrackerSparqlLiteralBinding*) tracker_sparql_data_binding_construct (object_type); 996 #line 56 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 997 return self; 998 #line 999 "tracker-sparql-query.c" 999 } 1000 1001 1002 TrackerSparqlLiteralBinding* tracker_sparql_literal_binding_new (void) { 1003 #line 56 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1004 return tracker_sparql_literal_binding_construct (TRACKER_SPARQL_TYPE_LITERAL_BINDING); 1005 #line 1006 "tracker-sparql-query.c" 1006 } 1007 1008 1009 static void tracker_sparql_literal_binding_class_init (TrackerSparqlLiteralBindingClass * klass) { 1010 #line 56 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1011 tracker_sparql_literal_binding_parent_class = g_type_class_peek_parent (klass); 1012 #line 56 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1013 G_OBJECT_CLASS (klass)->finalize = tracker_sparql_literal_binding_finalize; 1014 #line 1015 "tracker-sparql-query.c" 1015 } 1016 1017 1018 static void tracker_sparql_literal_binding_instance_init (TrackerSparqlLiteralBinding * self) { 1019 } 1020 1021 1022 static void tracker_sparql_literal_binding_finalize (GObject* obj) { 1023 TrackerSparqlLiteralBinding * self; 1024 #line 56 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1025 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_LITERAL_BINDING, TrackerSparqlLiteralBinding); 1026 #line 58 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1027 _g_free0 (self->literal); 1028 #line 56 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1029 G_OBJECT_CLASS (tracker_sparql_literal_binding_parent_class)->finalize (obj); 1030 #line 1031 "tracker-sparql-query.c" 1031 } 1032 1033 1034 GType tracker_sparql_literal_binding_get_type (void) { 1035 static volatile gsize tracker_sparql_literal_binding_type_id__volatile = 0; 1036 if (g_once_init_enter (&tracker_sparql_literal_binding_type_id__volatile)) { 1037 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlLiteralBindingClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_literal_binding_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlLiteralBinding), 0, (GInstanceInitFunc) tracker_sparql_literal_binding_instance_init, NULL }; 1038 GType tracker_sparql_literal_binding_type_id; 1039 tracker_sparql_literal_binding_type_id = g_type_register_static (TRACKER_SPARQL_TYPE_DATA_BINDING, "TrackerSparqlLiteralBinding", &g_define_type_info, 0); 1040 g_once_init_leave (&tracker_sparql_literal_binding_type_id__volatile, tracker_sparql_literal_binding_type_id); 1041 } 1042 return tracker_sparql_literal_binding_type_id__volatile; 1043 } 1044 1045 1046 TrackerSparqlVariableBinding* tracker_sparql_variable_binding_construct (GType object_type) { 1047 TrackerSparqlVariableBinding * self = NULL; 1048 #line 62 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1049 self = (TrackerSparqlVariableBinding*) tracker_sparql_data_binding_construct (object_type); 1050 #line 62 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1051 return self; 1052 #line 1053 "tracker-sparql-query.c" 1053 } 1054 1055 1056 TrackerSparqlVariableBinding* tracker_sparql_variable_binding_new (void) { 1057 #line 62 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1058 return tracker_sparql_variable_binding_construct (TRACKER_SPARQL_TYPE_VARIABLE_BINDING); 1059 #line 1060 "tracker-sparql-query.c" 1060 } 1061 1062 1063 static void tracker_sparql_variable_binding_class_init (TrackerSparqlVariableBindingClass * klass) { 1064 #line 62 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1065 tracker_sparql_variable_binding_parent_class = g_type_class_peek_parent (klass); 1066 #line 62 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1067 G_OBJECT_CLASS (klass)->finalize = tracker_sparql_variable_binding_finalize; 1068 #line 1069 "tracker-sparql-query.c" 1069 } 1070 1071 1072 static void tracker_sparql_variable_binding_instance_init (TrackerSparqlVariableBinding * self) { 1073 } 1074 1075 1076 static void tracker_sparql_variable_binding_finalize (GObject* obj) { 1077 TrackerSparqlVariableBinding * self; 1078 #line 62 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1079 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_VARIABLE_BINDING, TrackerSparqlVariableBinding); 1080 #line 67 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1081 _g_object_unref0 (self->type); 1082 #line 62 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1083 G_OBJECT_CLASS (tracker_sparql_variable_binding_parent_class)->finalize (obj); 1084 #line 1085 "tracker-sparql-query.c" 1085 } 1086 1087 1088 GType tracker_sparql_variable_binding_get_type (void) { 1089 static volatile gsize tracker_sparql_variable_binding_type_id__volatile = 0; 1090 if (g_once_init_enter (&tracker_sparql_variable_binding_type_id__volatile)) { 1091 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlVariableBindingClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_variable_binding_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlVariableBinding), 0, (GInstanceInitFunc) tracker_sparql_variable_binding_instance_init, NULL }; 1092 GType tracker_sparql_variable_binding_type_id; 1093 tracker_sparql_variable_binding_type_id = g_type_register_static (TRACKER_SPARQL_TYPE_DATA_BINDING, "TrackerSparqlVariableBinding", &g_define_type_info, 0); 1094 g_once_init_leave (&tracker_sparql_variable_binding_type_id__volatile, tracker_sparql_variable_binding_type_id); 1095 } 1096 return tracker_sparql_variable_binding_type_id__volatile; 1097 } 1098 1099 1100 static void _g_object_unref0_ (gpointer var) { 1101 #line 71 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1102 (var == NULL) ? NULL : (var = (g_object_unref (var), NULL)); 1103 #line 1104 "tracker-sparql-query.c" 1104 } 1105 1106 1107 static void _g_list_free__g_object_unref0_ (GList* self) { 1108 #line 71 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1109 g_list_foreach (self, (GFunc) _g_object_unref0_, NULL); 1110 #line 71 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1111 g_list_free (self); 1112 #line 1113 "tracker-sparql-query.c" 1113 } 1114 1115 1116 TrackerSparqlVariableBindingList* tracker_sparql_variable_binding_list_construct (GType object_type) { 1117 TrackerSparqlVariableBindingList * self = NULL; 1118 #line 70 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1119 self = (TrackerSparqlVariableBindingList*) g_object_new (object_type, NULL); 1120 #line 70 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1121 return self; 1122 #line 1123 "tracker-sparql-query.c" 1123 } 1124 1125 1126 TrackerSparqlVariableBindingList* tracker_sparql_variable_binding_list_new (void) { 1127 #line 70 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1128 return tracker_sparql_variable_binding_list_construct (TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST); 1129 #line 1130 "tracker-sparql-query.c" 1130 } 1131 1132 1133 static void tracker_sparql_variable_binding_list_class_init (TrackerSparqlVariableBindingListClass * klass) { 1134 #line 70 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1135 tracker_sparql_variable_binding_list_parent_class = g_type_class_peek_parent (klass); 1136 #line 70 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1137 G_OBJECT_CLASS (klass)->finalize = tracker_sparql_variable_binding_list_finalize; 1138 #line 1139 "tracker-sparql-query.c" 1139 } 1140 1141 1142 static void tracker_sparql_variable_binding_list_instance_init (TrackerSparqlVariableBindingList * self) { 1143 } 1144 1145 1146 static void tracker_sparql_variable_binding_list_finalize (GObject* obj) { 1147 TrackerSparqlVariableBindingList * self; 1148 #line 70 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1149 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST, TrackerSparqlVariableBindingList); 1150 #line 71 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1151 __g_list_free__g_object_unref0_0 (self->list); 1152 #line 70 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1153 G_OBJECT_CLASS (tracker_sparql_variable_binding_list_parent_class)->finalize (obj); 1154 #line 1155 "tracker-sparql-query.c" 1155 } 1156 1157 1158 GType tracker_sparql_variable_binding_list_get_type (void) { 1159 static volatile gsize tracker_sparql_variable_binding_list_type_id__volatile = 0; 1160 if (g_once_init_enter (&tracker_sparql_variable_binding_list_type_id__volatile)) { 1161 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlVariableBindingListClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_variable_binding_list_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlVariableBindingList), 0, (GInstanceInitFunc) tracker_sparql_variable_binding_list_instance_init, NULL }; 1162 GType tracker_sparql_variable_binding_list_type_id; 1163 tracker_sparql_variable_binding_list_type_id = g_type_register_static (G_TYPE_OBJECT, "TrackerSparqlVariableBindingList", &g_define_type_info, 0); 1164 g_once_init_leave (&tracker_sparql_variable_binding_list_type_id__volatile, tracker_sparql_variable_binding_list_type_id); 1165 } 1166 return tracker_sparql_variable_binding_list_type_id__volatile; 1167 } 1168 1169 1170 TrackerSparqlVariable* tracker_sparql_variable_construct (GType object_type, const gchar* name, gint index) { 1171 TrackerSparqlVariable * self = NULL; 1172 const gchar* _tmp0_; 1173 gint _tmp1_; 1174 gint _tmp2_; 1175 gchar* _tmp3_ = NULL; 1176 const gchar* _tmp4_; 1177 gchar* _tmp5_ = NULL; 1178 gchar* _tmp6_; 1179 #line 81 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1180 g_return_val_if_fail (name != NULL, NULL); 1181 #line 81 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1182 self = (TrackerSparqlVariable*) g_object_new (object_type, NULL); 1183 #line 82 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1184 _tmp0_ = name; 1185 #line 82 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1186 tracker_sparql_variable_set_name (self, _tmp0_); 1187 #line 83 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1188 _tmp1_ = index; 1189 #line 83 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1190 tracker_sparql_variable_set_index (self, _tmp1_); 1191 #line 84 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1192 _tmp2_ = index; 1193 #line 84 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1194 _tmp3_ = g_strdup_printf ("%d_u", _tmp2_); 1195 #line 84 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1196 _g_free0 (self->priv->sql_identifier); 1197 #line 84 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1198 self->priv->sql_identifier = _tmp3_; 1199 #line 85 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1200 _tmp4_ = self->priv->sql_identifier; 1201 #line 85 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1202 _tmp5_ = g_strdup_printf ("\"%s\"", _tmp4_); 1203 #line 85 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1204 _tmp6_ = _tmp5_; 1205 #line 85 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1206 tracker_sparql_variable_set_sql_expression (self, _tmp6_); 1207 #line 85 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1208 _g_free0 (_tmp6_); 1209 #line 81 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1210 return self; 1211 #line 1212 "tracker-sparql-query.c" 1212 } 1213 1214 1215 TrackerSparqlVariable* tracker_sparql_variable_new (const gchar* name, gint index) { 1216 #line 81 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1217 return tracker_sparql_variable_construct (TRACKER_SPARQL_TYPE_VARIABLE, name, index); 1218 #line 1219 "tracker-sparql-query.c" 1219 } 1220 1221 1222 gchar* tracker_sparql_variable_get_extra_sql_expression (TrackerSparqlVariable* self, const gchar* suffix) { 1223 gchar* result = NULL; 1224 const gchar* _tmp0_; 1225 const gchar* _tmp1_; 1226 gchar* _tmp2_ = NULL; 1227 #line 88 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1228 g_return_val_if_fail (self != NULL, NULL); 1229 #line 88 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1230 g_return_val_if_fail (suffix != NULL, NULL); 1231 #line 89 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1232 _tmp0_ = self->priv->sql_identifier; 1233 #line 89 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1234 _tmp1_ = suffix; 1235 #line 89 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1236 _tmp2_ = g_strdup_printf ("\"%s:%s\"", _tmp0_, _tmp1_); 1237 #line 89 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1238 result = _tmp2_; 1239 #line 89 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1240 return result; 1241 #line 1242 "tracker-sparql-query.c" 1242 } 1243 1244 1245 gboolean tracker_sparql_variable_equal (TrackerSparqlVariable* a, TrackerSparqlVariable* b) { 1246 gboolean result = FALSE; 1247 TrackerSparqlVariable* _tmp0_; 1248 gint _tmp1_; 1249 TrackerSparqlVariable* _tmp2_; 1250 gint _tmp3_; 1251 #line 92 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1252 g_return_val_if_fail (a != NULL, FALSE); 1253 #line 92 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1254 g_return_val_if_fail (b != NULL, FALSE); 1255 #line 93 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1256 _tmp0_ = a; 1257 #line 93 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1258 _tmp1_ = _tmp0_->priv->_index; 1259 #line 93 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1260 _tmp2_ = b; 1261 #line 93 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1262 _tmp3_ = _tmp2_->priv->_index; 1263 #line 93 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1264 result = _tmp1_ == _tmp3_; 1265 #line 93 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1266 return result; 1267 #line 1268 "tracker-sparql-query.c" 1268 } 1269 1270 1271 guint tracker_sparql_variable_hash (TrackerSparqlVariable* variable) { 1272 guint result = 0U; 1273 TrackerSparqlVariable* _tmp0_; 1274 gint _tmp1_; 1275 #line 96 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1276 g_return_val_if_fail (variable != NULL, 0U); 1277 #line 97 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1278 _tmp0_ = variable; 1279 #line 97 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1280 _tmp1_ = _tmp0_->priv->_index; 1281 #line 97 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1282 result = (guint) _tmp1_; 1283 #line 97 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1284 return result; 1285 #line 1286 "tracker-sparql-query.c" 1286 } 1287 1288 1289 const gchar* tracker_sparql_variable_get_name (TrackerSparqlVariable* self) { 1290 const gchar* result; 1291 const gchar* _tmp0_; 1292 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1293 g_return_val_if_fail (self != NULL, NULL); 1294 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1295 _tmp0_ = self->priv->_name; 1296 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1297 result = _tmp0_; 1298 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1299 return result; 1300 #line 1301 "tracker-sparql-query.c" 1301 } 1302 1303 1304 static void tracker_sparql_variable_set_name (TrackerSparqlVariable* self, const gchar* value) { 1305 const gchar* _tmp0_; 1306 gchar* _tmp1_; 1307 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1308 g_return_if_fail (self != NULL); 1309 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1310 _tmp0_ = value; 1311 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1312 _tmp1_ = g_strdup (_tmp0_); 1313 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1314 _g_free0 (self->priv->_name); 1315 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1316 self->priv->_name = _tmp1_; 1317 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1318 g_object_notify ((GObject *) self, "name"); 1319 #line 1320 "tracker-sparql-query.c" 1320 } 1321 1322 1323 gint tracker_sparql_variable_get_index (TrackerSparqlVariable* self) { 1324 gint result; 1325 gint _tmp0_; 1326 #line 76 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1327 g_return_val_if_fail (self != NULL, 0); 1328 #line 76 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1329 _tmp0_ = self->priv->_index; 1330 #line 76 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1331 result = _tmp0_; 1332 #line 76 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1333 return result; 1334 #line 1335 "tracker-sparql-query.c" 1335 } 1336 1337 1338 static void tracker_sparql_variable_set_index (TrackerSparqlVariable* self, gint value) { 1339 gint _tmp0_; 1340 #line 76 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1341 g_return_if_fail (self != NULL); 1342 #line 76 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1343 _tmp0_ = value; 1344 #line 76 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1345 self->priv->_index = _tmp0_; 1346 #line 76 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1347 g_object_notify ((GObject *) self, "index"); 1348 #line 1349 "tracker-sparql-query.c" 1349 } 1350 1351 1352 const gchar* tracker_sparql_variable_get_sql_expression (TrackerSparqlVariable* self) { 1353 const gchar* result; 1354 const gchar* _tmp0_; 1355 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1356 g_return_val_if_fail (self != NULL, NULL); 1357 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1358 _tmp0_ = self->priv->_sql_expression; 1359 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1360 result = _tmp0_; 1361 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1362 return result; 1363 #line 1364 "tracker-sparql-query.c" 1364 } 1365 1366 1367 static void tracker_sparql_variable_set_sql_expression (TrackerSparqlVariable* self, const gchar* value) { 1368 const gchar* _tmp0_; 1369 gchar* _tmp1_; 1370 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1371 g_return_if_fail (self != NULL); 1372 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1373 _tmp0_ = value; 1374 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1375 _tmp1_ = g_strdup (_tmp0_); 1376 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1377 _g_free0 (self->priv->_sql_expression); 1378 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1379 self->priv->_sql_expression = _tmp1_; 1380 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1381 g_object_notify ((GObject *) self, "sql-expression"); 1382 #line 1383 "tracker-sparql-query.c" 1383 } 1384 1385 1386 static void tracker_sparql_variable_class_init (TrackerSparqlVariableClass * klass) { 1387 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1388 tracker_sparql_variable_parent_class = g_type_class_peek_parent (klass); 1389 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1390 g_type_class_add_private (klass, sizeof (TrackerSparqlVariablePrivate)); 1391 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1392 G_OBJECT_CLASS (klass)->get_property = _vala_tracker_sparql_variable_get_property; 1393 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1394 G_OBJECT_CLASS (klass)->set_property = _vala_tracker_sparql_variable_set_property; 1395 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1396 G_OBJECT_CLASS (klass)->finalize = tracker_sparql_variable_finalize; 1397 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1398 g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_SPARQL_VARIABLE_NAME, g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); 1399 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1400 g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_SPARQL_VARIABLE_INDEX, g_param_spec_int ("index", "index", "index", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); 1401 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1402 g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_SPARQL_VARIABLE_SQL_EXPRESSION, g_param_spec_string ("sql-expression", "sql-expression", "sql-expression", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); 1403 #line 1404 "tracker-sparql-query.c" 1404 } 1405 1406 1407 static void tracker_sparql_variable_instance_init (TrackerSparqlVariable * self) { 1408 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1409 self->priv = TRACKER_SPARQL_VARIABLE_GET_PRIVATE (self); 1410 #line 1411 "tracker-sparql-query.c" 1411 } 1412 1413 1414 static void tracker_sparql_variable_finalize (GObject* obj) { 1415 TrackerSparqlVariable * self; 1416 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1417 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_VARIABLE, TrackerSparqlVariable); 1418 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1419 _g_free0 (self->priv->_name); 1420 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1421 _g_free0 (self->priv->_sql_expression); 1422 #line 78 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1423 _g_object_unref0 (self->binding); 1424 #line 79 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1425 _g_free0 (self->priv->sql_identifier); 1426 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1427 G_OBJECT_CLASS (tracker_sparql_variable_parent_class)->finalize (obj); 1428 #line 1429 "tracker-sparql-query.c" 1429 } 1430 1431 1432 GType tracker_sparql_variable_get_type (void) { 1433 static volatile gsize tracker_sparql_variable_type_id__volatile = 0; 1434 if (g_once_init_enter (&tracker_sparql_variable_type_id__volatile)) { 1435 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlVariableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_variable_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlVariable), 0, (GInstanceInitFunc) tracker_sparql_variable_instance_init, NULL }; 1436 GType tracker_sparql_variable_type_id; 1437 tracker_sparql_variable_type_id = g_type_register_static (G_TYPE_OBJECT, "TrackerSparqlVariable", &g_define_type_info, 0); 1438 g_once_init_leave (&tracker_sparql_variable_type_id__volatile, tracker_sparql_variable_type_id); 1439 } 1440 return tracker_sparql_variable_type_id__volatile; 1441 } 1442 1443 1444 static void _vala_tracker_sparql_variable_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { 1445 TrackerSparqlVariable * self; 1446 self = G_TYPE_CHECK_INSTANCE_CAST (object, TRACKER_SPARQL_TYPE_VARIABLE, TrackerSparqlVariable); 1447 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1448 switch (property_id) { 1449 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1450 case TRACKER_SPARQL_VARIABLE_NAME: 1451 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1452 g_value_set_string (value, tracker_sparql_variable_get_name (self)); 1453 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1454 break; 1455 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1456 case TRACKER_SPARQL_VARIABLE_INDEX: 1457 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1458 g_value_set_int (value, tracker_sparql_variable_get_index (self)); 1459 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1460 break; 1461 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1462 case TRACKER_SPARQL_VARIABLE_SQL_EXPRESSION: 1463 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1464 g_value_set_string (value, tracker_sparql_variable_get_sql_expression (self)); 1465 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1466 break; 1467 #line 1468 "tracker-sparql-query.c" 1468 default: 1469 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1470 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); 1471 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1472 break; 1473 #line 1474 "tracker-sparql-query.c" 1474 } 1475 } 1476 1477 1478 static void _vala_tracker_sparql_variable_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { 1479 TrackerSparqlVariable * self; 1480 self = G_TYPE_CHECK_INSTANCE_CAST (object, TRACKER_SPARQL_TYPE_VARIABLE, TrackerSparqlVariable); 1481 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1482 switch (property_id) { 1483 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1484 case TRACKER_SPARQL_VARIABLE_NAME: 1485 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1486 tracker_sparql_variable_set_name (self, g_value_get_string (value)); 1487 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1488 break; 1489 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1490 case TRACKER_SPARQL_VARIABLE_INDEX: 1491 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1492 tracker_sparql_variable_set_index (self, g_value_get_int (value)); 1493 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1494 break; 1495 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1496 case TRACKER_SPARQL_VARIABLE_SQL_EXPRESSION: 1497 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1498 tracker_sparql_variable_set_sql_expression (self, g_value_get_string (value)); 1499 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1500 break; 1501 #line 1502 "tracker-sparql-query.c" 1502 default: 1503 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1504 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); 1505 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1506 break; 1507 #line 1508 "tracker-sparql-query.c" 1508 } 1509 } 1510 1511 1512 static gpointer _tracker_sparql_context_ref0 (gpointer self) { 1513 #line 120 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1514 return self ? tracker_sparql_context_ref (self) : NULL; 1515 #line 1516 "tracker-sparql-query.c" 1516 } 1517 1518 1519 static guint _tracker_sparql_variable_hash_ghash_func (gconstpointer key) { 1520 guint result; 1521 result = tracker_sparql_variable_hash (key);
passing argument 1 of 'tracker_sparql_variable_hash' discards 'const' qualifier from pointer target type [enabled by default]
(emitted by gcc)
1522 #line 121 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1523 return result; 1524 #line 1525 "tracker-sparql-query.c" 1525 } 1526 1527 1528 static gboolean _tracker_sparql_variable_equal_gequal_func (gconstpointer a, gconstpointer b) { 1529 gboolean result; 1530 result = tracker_sparql_variable_equal (a, b);
passing argument 1 of 'tracker_sparql_variable_equal' discards 'const' qualifier from pointer target type [enabled by default]
(emitted by gcc)
1531 #line 121 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1532 return result; 1533 #line 1534 "tracker-sparql-query.c" 1534 } 1535 1536 1537 static gpointer _g_hash_table_ref0 (gpointer self) { 1538 #line 128 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1539 return self ? g_hash_table_ref (self) : NULL; 1540 #line 1541 "tracker-sparql-query.c" 1541 } 1542 1543 1544 TrackerSparqlContext* tracker_sparql_context_construct (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context) { 1545 TrackerSparqlContext* self = NULL; 1546 TrackerSparqlQuery* _tmp0_; 1547 TrackerSparqlContext* _tmp1_; 1548 TrackerSparqlContext* _tmp2_; 1549 GDestroyNotify _tmp3_; 1550 GHashTable* _tmp4_; 1551 TrackerSparqlContext* _tmp5_; 1552 #line 118 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1553 g_return_val_if_fail (query != NULL, NULL); 1554 #line 118 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1555 self = (TrackerSparqlContext*) g_type_create_instance (object_type); 1556 #line 119 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1557 _tmp0_ = query; 1558 #line 119 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1559 self->query = _tmp0_; 1560 #line 120 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1561 _tmp1_ = parent_context; 1562 #line 120 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1563 _tmp2_ = _tracker_sparql_context_ref0 (_tmp1_); 1564 #line 120 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1565 _tracker_sparql_context_unref0 (self->parent_context); 1566 #line 120 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1567 self->parent_context = _tmp2_; 1568 #line 121 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1569 _tmp3_ = g_object_unref; 1570 #line 121 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1571 _tmp4_ = g_hash_table_new_full (_tracker_sparql_variable_hash_ghash_func, _tracker_sparql_variable_equal_gequal_func, _tmp3_, NULL); 1572 #line 121 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1573 _g_hash_table_unref0 (self->var_set); 1574 #line 121 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1575 self->var_set = _tmp4_; 1576 #line 123 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1577 _tmp5_ = parent_context; 1578 #line 123 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1579 if (_tmp5_ == NULL) { 1580 #line 1581 "tracker-sparql-query.c" 1581 GDestroyNotify _tmp6_; 1582 GHashTable* _tmp7_; 1583 GHashFunc _tmp8_; 1584 GEqualFunc _tmp9_; 1585 GDestroyNotify _tmp10_; 1586 GDestroyNotify _tmp11_; 1587 GHashTable* _tmp12_; 1588 GDestroyNotify _tmp13_; 1589 GDestroyNotify _tmp14_; 1590 GHashTable* _tmp15_; 1591 #line 124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1592 _tmp6_ = g_object_unref; 1593 #line 124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1594 _tmp7_ = g_hash_table_new_full (_tracker_sparql_variable_hash_ghash_func, _tracker_sparql_variable_equal_gequal_func, _tmp6_, NULL); 1595 #line 124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1596 _g_hash_table_unref0 (self->select_var_set); 1597 #line 124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1598 self->select_var_set = _tmp7_; 1599 #line 125 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1600 _tmp8_ = g_str_hash; 1601 #line 125 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1602 _tmp9_ = g_str_equal; 1603 #line 125 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1604 _tmp10_ = g_free; 1605 #line 125 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1606 _tmp11_ = g_object_unref; 1607 #line 125 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1608 _tmp12_ = g_hash_table_new_full (_tmp8_, _tmp9_, _tmp10_, _tmp11_); 1609 #line 125 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1610 _g_hash_table_unref0 (self->var_map); 1611 #line 125 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1612 self->var_map = _tmp12_; 1613 #line 126 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1614 _tmp13_ = g_object_unref; 1615 #line 126 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1616 _tmp14_ = g_object_unref; 1617 #line 126 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1618 _tmp15_ = g_hash_table_new_full (_tracker_sparql_variable_hash_ghash_func, _tracker_sparql_variable_equal_gequal_func, _tmp13_, _tmp14_); 1619 #line 126 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1620 _g_hash_table_unref0 (self->predicate_variable_map); 1621 #line 126 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1622 self->predicate_variable_map = _tmp15_; 1623 #line 1624 "tracker-sparql-query.c" 1624 } else { 1625 TrackerSparqlContext* _tmp16_; 1626 GHashTable* _tmp17_; 1627 GHashTable* _tmp18_; 1628 TrackerSparqlContext* _tmp19_; 1629 GHashTable* _tmp20_; 1630 GHashTable* _tmp21_; 1631 TrackerSparqlContext* _tmp22_; 1632 GHashTable* _tmp23_; 1633 GHashTable* _tmp24_; 1634 #line 128 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1635 _tmp16_ = parent_context; 1636 #line 128 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1637 _tmp17_ = _tmp16_->select_var_set; 1638 #line 128 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1639 _tmp18_ = _g_hash_table_ref0 (_tmp17_); 1640 #line 128 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1641 _g_hash_table_unref0 (self->select_var_set); 1642 #line 128 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1643 self->select_var_set = _tmp18_; 1644 #line 129 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1645 _tmp19_ = parent_context; 1646 #line 129 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1647 _tmp20_ = _tmp19_->var_map; 1648 #line 129 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1649 _tmp21_ = _g_hash_table_ref0 (_tmp20_); 1650 #line 129 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1651 _g_hash_table_unref0 (self->var_map); 1652 #line 129 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1653 self->var_map = _tmp21_; 1654 #line 130 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1655 _tmp22_ = parent_context; 1656 #line 130 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1657 _tmp23_ = _tmp22_->predicate_variable_map; 1658 #line 130 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1659 _tmp24_ = _g_hash_table_ref0 (_tmp23_); 1660 #line 130 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1661 _g_hash_table_unref0 (self->predicate_variable_map); 1662 #line 130 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1663 self->predicate_variable_map = _tmp24_; 1664 #line 1665 "tracker-sparql-query.c" 1665 } 1666 #line 118 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1667 return self; 1668 #line 1669 "tracker-sparql-query.c" 1669 } 1670 1671 1672 TrackerSparqlContext* tracker_sparql_context_new (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context) { 1673 #line 118 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1674 return tracker_sparql_context_construct (TRACKER_SPARQL_TYPE_CONTEXT, query, parent_context); 1675 #line 1676 "tracker-sparql-query.c" 1676 } 1677 1678 1679 TrackerSparqlContext* tracker_sparql_context_construct_subquery (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context) { 1680 TrackerSparqlContext* self = NULL; 1681 TrackerSparqlQuery* _tmp0_; 1682 TrackerSparqlContext* _tmp1_; 1683 TrackerSparqlContext* _tmp2_; 1684 GDestroyNotify _tmp3_; 1685 GHashTable* _tmp4_; 1686 GDestroyNotify _tmp5_; 1687 GHashTable* _tmp6_; 1688 TrackerSparqlContext* _tmp7_; 1689 GHashTable* _tmp8_; 1690 GHashTable* _tmp9_; 1691 GDestroyNotify _tmp10_; 1692 GDestroyNotify _tmp11_; 1693 GHashTable* _tmp12_; 1694 #line 134 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1695 g_return_val_if_fail (query != NULL, NULL); 1696 #line 134 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1697 g_return_val_if_fail (parent_context != NULL, NULL); 1698 #line 134 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1699 self = (TrackerSparqlContext*) g_type_create_instance (object_type); 1700 #line 135 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1701 _tmp0_ = query; 1702 #line 135 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1703 self->query = _tmp0_; 1704 #line 136 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1705 _tmp1_ = parent_context; 1706 #line 136 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1707 _tmp2_ = _tracker_sparql_context_ref0 (_tmp1_); 1708 #line 136 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1709 _tracker_sparql_context_unref0 (self->parent_context); 1710 #line 136 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1711 self->parent_context = _tmp2_; 1712 #line 137 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1713 _tmp3_ = g_object_unref; 1714 #line 137 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1715 _tmp4_ = g_hash_table_new_full (_tracker_sparql_variable_hash_ghash_func, _tracker_sparql_variable_equal_gequal_func, _tmp3_, NULL); 1716 #line 137 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1717 _g_hash_table_unref0 (self->var_set); 1718 #line 137 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1719 self->var_set = _tmp4_; 1720 #line 139 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1721 _tmp5_ = g_object_unref; 1722 #line 139 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1723 _tmp6_ = g_hash_table_new_full (_tracker_sparql_variable_hash_ghash_func, _tracker_sparql_variable_equal_gequal_func, _tmp5_, NULL); 1724 #line 139 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1725 _g_hash_table_unref0 (self->select_var_set); 1726 #line 139 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1727 self->select_var_set = _tmp6_; 1728 #line 140 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1729 _tmp7_ = parent_context; 1730 #line 140 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1731 _tmp8_ = _tmp7_->var_map; 1732 #line 140 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1733 _tmp9_ = _g_hash_table_ref0 (_tmp8_); 1734 #line 140 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1735 _g_hash_table_unref0 (self->var_map); 1736 #line 140 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1737 self->var_map = _tmp9_; 1738 #line 141 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1739 _tmp10_ = g_object_unref; 1740 #line 141 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1741 _tmp11_ = g_object_unref; 1742 #line 141 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1743 _tmp12_ = g_hash_table_new_full (_tracker_sparql_variable_hash_ghash_func, _tracker_sparql_variable_equal_gequal_func, _tmp10_, _tmp11_); 1744 #line 141 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1745 _g_hash_table_unref0 (self->predicate_variable_map); 1746 #line 141 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1747 self->predicate_variable_map = _tmp12_; 1748 #line 142 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1749 self->scalar_subquery = TRUE; 1750 #line 134 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1751 return self; 1752 #line 1753 "tracker-sparql-query.c" 1753 } 1754 1755 1756 TrackerSparqlContext* tracker_sparql_context_new_subquery (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context) { 1757 #line 134 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1758 return tracker_sparql_context_construct_subquery (TRACKER_SPARQL_TYPE_CONTEXT, query, parent_context); 1759 #line 1760 "tracker-sparql-query.c" 1760 } 1761 1762 1763 static gpointer _g_object_ref0 (gpointer self) { 1764 #line 149 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1765 return self ? g_object_ref (self) : NULL; 1766 #line 1767 "tracker-sparql-query.c" 1767 } 1768 1769 1770 TrackerSparqlVariable* tracker_sparql_context_get_variable (TrackerSparqlContext* self, const gchar* name) { 1771 TrackerSparqlVariable* result = NULL; 1772 GHashTable* _tmp0_; 1773 const gchar* _tmp1_; 1774 gconstpointer _tmp2_ = NULL; 1775 TrackerSparqlVariable* _result_; 1776 TrackerSparqlVariable* _tmp3_; 1777 TrackerSparqlVariable* _tmp16_; 1778 #line 145 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1779 g_return_val_if_fail (self != NULL, NULL); 1780 #line 145 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1781 g_return_val_if_fail (name != NULL, NULL); 1782 #line 146 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1783 _tmp0_ = self->var_map; 1784 #line 146 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1785 _tmp1_ = name; 1786 #line 146 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1787 _tmp2_ = g_hash_table_lookup (_tmp0_, _tmp1_); 1788 #line 146 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1789 _result_ = (TrackerSparqlVariable*) _tmp2_; 1790 #line 147 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1791 _tmp3_ = _result_; 1792 #line 147 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1793 if (_tmp3_ == NULL) { 1794 #line 1795 "tracker-sparql-query.c" 1795 const gchar* _tmp4_; 1796 TrackerSparqlQuery* _tmp5_;
variable '_tmp5_' set but not used
(emitted by gcc)
1797 TrackerSparqlQuery* _tmp6_; 1798 gint _tmp7_; 1799 gint _tmp8_; 1800 TrackerSparqlVariable* _tmp9_; 1801 TrackerSparqlVariable* variable; 1802 GHashTable* _tmp10_; 1803 const gchar* _tmp11_; 1804 gchar* _tmp12_; 1805 TrackerSparqlVariable* _tmp13_; 1806 TrackerSparqlVariable* _tmp14_; 1807 TrackerSparqlVariable* _tmp15_; 1808 #line 148 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1809 _tmp4_ = name; 1810 #line 148 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1811 _tmp5_ = self->query;
Value stored to '_tmp5_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

1812 #line 148 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1813 _tmp6_ = self->query; 1814 #line 148 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1815 _tmp7_ = _tmp6_->last_var_index; 1816 #line 148 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1817 _tmp6_->last_var_index = _tmp7_ + 1; 1818 #line 148 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1819 _tmp8_ = _tmp6_->last_var_index; 1820 #line 148 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1821 _tmp9_ = tracker_sparql_variable_new (_tmp4_, _tmp8_); 1822 #line 148 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1823 variable = _tmp9_; 1824 #line 149 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1825 _tmp10_ = self->var_map; 1826 #line 149 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1827 _tmp11_ = name; 1828 #line 149 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1829 _tmp12_ = g_strdup (_tmp11_); 1830 #line 149 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1831 _tmp13_ = variable; 1832 #line 149 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1833 _tmp14_ = _g_object_ref0 (_tmp13_); 1834 #line 149 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1835 g_hash_table_insert (_tmp10_, _tmp12_, _tmp14_); 1836 #line 151 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1837 _tmp15_ = variable; 1838 #line 151 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1839 _result_ = _tmp15_; 1840 #line 147 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1841 _g_object_unref0 (variable); 1842 #line 1843 "tracker-sparql-query.c" 1843 } 1844 #line 153 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1845 _tmp16_ = _result_; 1846 #line 153 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1847 result = _tmp16_; 1848 #line 153 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1849 return result; 1850 #line 1851 "tracker-sparql-query.c" 1851 } 1852 1853 1854 static void tracker_sparql_value_context_init (GValue* value) { 1855 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1856 value->data[0].v_pointer = NULL; 1857 #line 1858 "tracker-sparql-query.c" 1858 } 1859 1860 1861 static void tracker_sparql_value_context_free_value (GValue* value) { 1862 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1863 if (value->data[0].v_pointer) { 1864 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1865 tracker_sparql_context_unref (value->data[0].v_pointer); 1866 #line 1867 "tracker-sparql-query.c" 1867 } 1868 } 1869 1870 1871 static void tracker_sparql_value_context_copy_value (const GValue* src_value, GValue* dest_value) { 1872 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1873 if (src_value->data[0].v_pointer) { 1874 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1875 dest_value->data[0].v_pointer = tracker_sparql_context_ref (src_value->data[0].v_pointer); 1876 #line 1877 "tracker-sparql-query.c" 1877 } else { 1878 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1879 dest_value->data[0].v_pointer = NULL; 1880 #line 1881 "tracker-sparql-query.c" 1881 } 1882 } 1883 1884 1885 static gpointer tracker_sparql_value_context_peek_pointer (const GValue* value) { 1886 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1887 return value->data[0].v_pointer; 1888 #line 1889 "tracker-sparql-query.c" 1889 } 1890 1891 1892 static gchar* tracker_sparql_value_context_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { 1893 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1894 if (collect_values[0].v_pointer) { 1895 #line 1896 "tracker-sparql-query.c" 1896 TrackerSparqlContext* object; 1897 object = collect_values[0].v_pointer; 1898 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1899 if (object->parent_instance.g_class == NULL) { 1900 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1901 return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); 1902 #line 1903 "tracker-sparql-query.c" 1903 } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { 1904 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1905 return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); 1906 #line 1907 "tracker-sparql-query.c" 1907 } 1908 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1909 value->data[0].v_pointer = tracker_sparql_context_ref (object); 1910 #line 1911 "tracker-sparql-query.c" 1911 } else { 1912 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1913 value->data[0].v_pointer = NULL; 1914 #line 1915 "tracker-sparql-query.c" 1915 } 1916 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1917 return NULL; 1918 #line 1919 "tracker-sparql-query.c" 1919 } 1920 1921 1922 static gchar* tracker_sparql_value_context_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { 1923 TrackerSparqlContext** object_p; 1924 object_p = collect_values[0].v_pointer; 1925 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1926 if (!object_p) { 1927 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1928 return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); 1929 #line 1930 "tracker-sparql-query.c" 1930 } 1931 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1932 if (!value->data[0].v_pointer) { 1933 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1934 *object_p = NULL; 1935 #line 1936 "tracker-sparql-query.c" 1936 } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { 1937 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1938 *object_p = value->data[0].v_pointer; 1939 #line 1940 "tracker-sparql-query.c" 1940 } else { 1941 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1942 *object_p = tracker_sparql_context_ref (value->data[0].v_pointer); 1943 #line 1944 "tracker-sparql-query.c" 1944 } 1945 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1946 return NULL; 1947 #line 1948 "tracker-sparql-query.c" 1948 } 1949 1950 1951 GParamSpec* tracker_sparql_param_spec_context (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { 1952 TrackerSparqlParamSpecContext* spec; 1953 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1954 g_return_val_if_fail (g_type_is_a (object_type, TRACKER_SPARQL_TYPE_CONTEXT), NULL); 1955 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1956 spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); 1957 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1958 G_PARAM_SPEC (spec)->value_type = object_type; 1959 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1960 return G_PARAM_SPEC (spec); 1961 #line 1962 "tracker-sparql-query.c" 1962 } 1963 1964 1965 gpointer tracker_sparql_value_get_context (const GValue* value) { 1966 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1967 g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_SPARQL_TYPE_CONTEXT), NULL); 1968 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1969 return value->data[0].v_pointer; 1970 #line 1971 "tracker-sparql-query.c" 1971 } 1972 1973 1974 void tracker_sparql_value_set_context (GValue* value, gpointer v_object) { 1975 TrackerSparqlContext* old; 1976 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1977 g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_SPARQL_TYPE_CONTEXT)); 1978 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1979 old = value->data[0].v_pointer; 1980 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1981 if (v_object) { 1982 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1983 g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TRACKER_SPARQL_TYPE_CONTEXT)); 1984 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1985 g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); 1986 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1987 value->data[0].v_pointer = v_object; 1988 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1989 tracker_sparql_context_ref (value->data[0].v_pointer); 1990 #line 1991 "tracker-sparql-query.c" 1991 } else { 1992 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1993 value->data[0].v_pointer = NULL; 1994 #line 1995 "tracker-sparql-query.c" 1995 } 1996 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1997 if (old) { 1998 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 1999 tracker_sparql_context_unref (old); 2000 #line 2001 "tracker-sparql-query.c" 2001 } 2002 } 2003 2004 2005 void tracker_sparql_value_take_context (GValue* value, gpointer v_object) { 2006 TrackerSparqlContext* old; 2007 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2008 g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_SPARQL_TYPE_CONTEXT)); 2009 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2010 old = value->data[0].v_pointer; 2011 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2012 if (v_object) { 2013 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2014 g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TRACKER_SPARQL_TYPE_CONTEXT)); 2015 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2016 g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); 2017 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2018 value->data[0].v_pointer = v_object; 2019 #line 2020 "tracker-sparql-query.c" 2020 } else { 2021 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2022 value->data[0].v_pointer = NULL; 2023 #line 2024 "tracker-sparql-query.c" 2024 } 2025 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2026 if (old) { 2027 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2028 tracker_sparql_context_unref (old); 2029 #line 2030 "tracker-sparql-query.c" 2030 } 2031 } 2032 2033 2034 static void tracker_sparql_context_class_init (TrackerSparqlContextClass * klass) { 2035 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2036 tracker_sparql_context_parent_class = g_type_class_peek_parent (klass); 2037 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2038 TRACKER_SPARQL_CONTEXT_CLASS (klass)->finalize = tracker_sparql_context_finalize; 2039 #line 2040 "tracker-sparql-query.c" 2040 } 2041 2042 2043 static void tracker_sparql_context_instance_init (TrackerSparqlContext * self) { 2044 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2045 self->ref_count = 1; 2046 #line 2047 "tracker-sparql-query.c" 2047 } 2048 2049 2050 static void tracker_sparql_context_finalize (TrackerSparqlContext* obj) { 2051 TrackerSparqlContext * self; 2052 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2053 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_CONTEXT, TrackerSparqlContext); 2054 #line 104 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2055 _tracker_sparql_context_unref0 (self->parent_context); 2056 #line 107 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2057 _g_hash_table_unref0 (self->var_set); 2058 #line 109 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2059 _g_hash_table_unref0 (self->var_map); 2060 #line 111 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2061 _g_hash_table_unref0 (self->select_var_set); 2062 #line 114 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2063 _g_hash_table_unref0 (self->predicate_variable_map); 2064 #line 2065 "tracker-sparql-query.c" 2065 } 2066 2067 2068 GType tracker_sparql_context_get_type (void) { 2069 static volatile gsize tracker_sparql_context_type_id__volatile = 0; 2070 if (g_once_init_enter (&tracker_sparql_context_type_id__volatile)) { 2071 static const GTypeValueTable g_define_type_value_table = { tracker_sparql_value_context_init, tracker_sparql_value_context_free_value, tracker_sparql_value_context_copy_value, tracker_sparql_value_context_peek_pointer, "p", tracker_sparql_value_context_collect_value, "p", tracker_sparql_value_context_lcopy_value }; 2072 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlContextClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_context_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlContext), 0, (GInstanceInitFunc) tracker_sparql_context_instance_init, &g_define_type_value_table }; 2073 static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; 2074 GType tracker_sparql_context_type_id; 2075 tracker_sparql_context_type_id = g_type_register_fundamental (g_type_fundamental_next (), "TrackerSparqlContext", &g_define_type_info, &g_define_type_fundamental_info, 0); 2076 g_once_init_leave (&tracker_sparql_context_type_id__volatile, tracker_sparql_context_type_id); 2077 } 2078 return tracker_sparql_context_type_id__volatile; 2079 } 2080 2081 2082 gpointer tracker_sparql_context_ref (gpointer instance) { 2083 TrackerSparqlContext* self; 2084 self = instance; 2085 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2086 g_atomic_int_inc (&self->ref_count); 2087 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2088 return instance; 2089 #line 2090 "tracker-sparql-query.c" 2090 } 2091 2092 2093 void tracker_sparql_context_unref (gpointer instance) { 2094 TrackerSparqlContext* self; 2095 self = instance; 2096 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2097 if (g_atomic_int_dec_and_test (&self->ref_count)) { 2098 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2099 TRACKER_SPARQL_CONTEXT_GET_CLASS (self)->finalize (self); 2100 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2101 g_type_free_instance ((GTypeInstance *) self); 2102 #line 2103 "tracker-sparql-query.c" 2103 } 2104 } 2105 2106 2107 TrackerSparqlSelectContext* tracker_sparql_select_context_construct (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context) { 2108 TrackerSparqlSelectContext* self = NULL; 2109 TrackerSparqlQuery* _tmp0_; 2110 TrackerSparqlContext* _tmp1_; 2111 #line 162 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2112 g_return_val_if_fail (query != NULL, NULL); 2113 #line 163 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2114 _tmp0_ = query; 2115 #line 163 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2116 _tmp1_ = parent_context; 2117 #line 163 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2118 self = (TrackerSparqlSelectContext*) tracker_sparql_context_construct (object_type, _tmp0_, _tmp1_); 2119 #line 162 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2120 return self; 2121 #line 2122 "tracker-sparql-query.c" 2122 } 2123 2124 2125 TrackerSparqlSelectContext* tracker_sparql_select_context_new (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context) { 2126 #line 162 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2127 return tracker_sparql_select_context_construct (TRACKER_SPARQL_TYPE_SELECT_CONTEXT, query, parent_context); 2128 #line 2129 "tracker-sparql-query.c" 2129 } 2130 2131 2132 TrackerSparqlSelectContext* tracker_sparql_select_context_construct_subquery (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context) { 2133 TrackerSparqlSelectContext* self = NULL; 2134 TrackerSparqlQuery* _tmp0_; 2135 TrackerSparqlContext* _tmp1_; 2136 #line 166 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2137 g_return_val_if_fail (query != NULL, NULL); 2138 #line 166 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2139 g_return_val_if_fail (parent_context != NULL, NULL); 2140 #line 167 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2141 _tmp0_ = query; 2142 #line 167 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2143 _tmp1_ = parent_context; 2144 #line 167 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2145 self = (TrackerSparqlSelectContext*) tracker_sparql_context_construct_subquery (object_type, _tmp0_, _tmp1_); 2146 #line 166 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2147 return self; 2148 #line 2149 "tracker-sparql-query.c" 2149 } 2150 2151 2152 TrackerSparqlSelectContext* tracker_sparql_select_context_new_subquery (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context) { 2153 #line 166 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2154 return tracker_sparql_select_context_construct_subquery (TRACKER_SPARQL_TYPE_SELECT_CONTEXT, query, parent_context); 2155 #line 2156 "tracker-sparql-query.c" 2156 } 2157 2158 2159 static void tracker_sparql_select_context_class_init (TrackerSparqlSelectContextClass * klass) { 2160 #line 157 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2161 tracker_sparql_select_context_parent_class = g_type_class_peek_parent (klass); 2162 #line 157 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2163 TRACKER_SPARQL_CONTEXT_CLASS (klass)->finalize = tracker_sparql_select_context_finalize; 2164 #line 2165 "tracker-sparql-query.c" 2165 } 2166 2167 2168 static void tracker_sparql_select_context_instance_init (TrackerSparqlSelectContext * self) { 2169 TrackerPropertyType* _tmp0_ = NULL; 2170 gchar** _tmp1_ = NULL; 2171 #line 159 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2172 _tmp0_ = g_new0 (TrackerPropertyType, 0); 2173 #line 159 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2174 self->types = _tmp0_; 2175 #line 159 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2176 self->types_length1 = 0; 2177 #line 159 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2178 self->_types_size_ = self->types_length1; 2179 #line 160 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2180 _tmp1_ = g_new0 (gchar*, 0 + 1); 2181 #line 160 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2182 self->variable_names = _tmp1_; 2183 #line 160 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2184 self->variable_names_length1 = 0; 2185 #line 160 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2186 self->_variable_names_size_ = self->variable_names_length1; 2187 #line 2188 "tracker-sparql-query.c" 2188 } 2189 2190 2191 static void tracker_sparql_select_context_finalize (TrackerSparqlContext* obj) { 2192 TrackerSparqlSelectContext * self; 2193 #line 157 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2194 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_SELECT_CONTEXT, TrackerSparqlSelectContext); 2195 #line 159 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2196 self->types = (g_free (self->types), NULL); 2197 #line 160 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2198 self->variable_names = (_vala_array_free (self->variable_names, self->variable_names_length1, (GDestroyNotify) g_free), NULL); 2199 #line 157 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2200 TRACKER_SPARQL_CONTEXT_CLASS (tracker_sparql_select_context_parent_class)->finalize (obj); 2201 #line 2202 "tracker-sparql-query.c" 2202 } 2203 2204 2205 GType tracker_sparql_select_context_get_type (void) { 2206 static volatile gsize tracker_sparql_select_context_type_id__volatile = 0; 2207 if (g_once_init_enter (&tracker_sparql_select_context_type_id__volatile)) { 2208 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlSelectContextClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_select_context_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlSelectContext), 0, (GInstanceInitFunc) tracker_sparql_select_context_instance_init, NULL }; 2209 GType tracker_sparql_select_context_type_id; 2210 tracker_sparql_select_context_type_id = g_type_register_static (TRACKER_SPARQL_TYPE_CONTEXT, "TrackerSparqlSelectContext", &g_define_type_info, 0); 2211 g_once_init_leave (&tracker_sparql_select_context_type_id__volatile, tracker_sparql_select_context_type_id); 2212 } 2213 return tracker_sparql_select_context_type_id__volatile; 2214 } 2215 2216 2217 static void _g_free0_ (gpointer var) { 2218 #line 177 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2219 var = (g_free (var), NULL); 2220 #line 2221 "tracker-sparql-query.c" 2221 } 2222 2223 2224 TrackerSparqlSolution* tracker_sparql_solution_construct (GType object_type) { 2225 TrackerSparqlSolution* self = NULL; 2226 GHashFunc _tmp0_; 2227 GEqualFunc _tmp1_; 2228 GHashTable* _tmp2_; 2229 GPtrArray* _tmp3_; 2230 #line 176 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2231 self = (TrackerSparqlSolution*) g_type_create_instance (object_type); 2232 #line 177 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2233 _tmp0_ = g_str_hash; 2234 #line 177 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2235 _tmp1_ = g_str_equal; 2236 #line 177 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2237 _tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, NULL); 2238 #line 177 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2239 _g_hash_table_unref0 (self->hash); 2240 #line 177 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2241 self->hash = _tmp2_; 2242 #line 178 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2243 _tmp3_ = g_ptr_array_new_with_free_func (_g_free0_); 2244 #line 178 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2245 _g_ptr_array_unref0 (self->values); 2246 #line 178 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2247 self->values = _tmp3_; 2248 #line 176 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2249 return self; 2250 #line 2251 "tracker-sparql-query.c" 2251 } 2252 2253 2254 TrackerSparqlSolution* tracker_sparql_solution_new (void) { 2255 #line 176 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2256 return tracker_sparql_solution_construct (TRACKER_SPARQL_TYPE_SOLUTION); 2257 #line 2258 "tracker-sparql-query.c" 2258 } 2259 2260 2261 gchar* tracker_sparql_solution_lookup (TrackerSparqlSolution* self, const gchar* variable_name) { 2262 gchar* result = NULL; 2263 gint variable_index = 0; 2264 GHashTable* _tmp0_; 2265 const gchar* _tmp1_; 2266 gconstpointer _tmp2_ = NULL; 2267 gboolean _tmp3_ = FALSE; 2268 GPtrArray* _tmp4_; 2269 gint _tmp5_; 2270 GHashTable* _tmp6_; 2271 guint _tmp7_ = 0U; 2272 gint _tmp8_; 2273 gconstpointer _tmp9_ = NULL; 2274 gchar* _tmp10_; 2275 #line 181 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2276 g_return_val_if_fail (self != NULL, NULL); 2277 #line 181 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2278 g_return_val_if_fail (variable_name != NULL, NULL); 2279 #line 183 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2280 _tmp0_ = self->hash; 2281 #line 183 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2282 _tmp1_ = variable_name; 2283 #line 183 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2284 _tmp3_ = g_hash_table_lookup_extended (_tmp0_, _tmp1_, NULL, &_tmp2_); 2285 #line 183 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2286 variable_index = _tmp2_; 2287 #line 183 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2288 if (!_tmp3_) { 2289 #line 184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2290 result = NULL; 2291 #line 184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2292 return result; 2293 #line 2294 "tracker-sparql-query.c" 2294 } 2295 #line 186 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2296 _tmp4_ = self->values; 2297 #line 186 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2298 _tmp5_ = self->solution_index; 2299 #line 186 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2300 _tmp6_ = self->hash; 2301 #line 186 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2302 _tmp7_ = g_hash_table_size (_tmp6_); 2303 #line 186 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2304 _tmp8_ = variable_index; 2305 #line 186 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2306 _tmp9_ = g_ptr_array_index (_tmp4_, (_tmp5_ * _tmp7_) + _tmp8_); 2307 #line 186 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2308 _tmp10_ = g_strdup ((const gchar*) _tmp9_); 2309 #line 186 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2310 result = _tmp10_; 2311 #line 186 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2312 return result; 2313 #line 2314 "tracker-sparql-query.c" 2314 } 2315 2316 2317 static void tracker_sparql_value_solution_init (GValue* value) { 2318 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2319 value->data[0].v_pointer = NULL; 2320 #line 2321 "tracker-sparql-query.c" 2321 } 2322 2323 2324 static void tracker_sparql_value_solution_free_value (GValue* value) { 2325 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2326 if (value->data[0].v_pointer) { 2327 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2328 tracker_sparql_solution_unref (value->data[0].v_pointer); 2329 #line 2330 "tracker-sparql-query.c" 2330 } 2331 } 2332 2333 2334 static void tracker_sparql_value_solution_copy_value (const GValue* src_value, GValue* dest_value) { 2335 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2336 if (src_value->data[0].v_pointer) { 2337 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2338 dest_value->data[0].v_pointer = tracker_sparql_solution_ref (src_value->data[0].v_pointer); 2339 #line 2340 "tracker-sparql-query.c" 2340 } else { 2341 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2342 dest_value->data[0].v_pointer = NULL; 2343 #line 2344 "tracker-sparql-query.c" 2344 } 2345 } 2346 2347 2348 static gpointer tracker_sparql_value_solution_peek_pointer (const GValue* value) { 2349 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2350 return value->data[0].v_pointer; 2351 #line 2352 "tracker-sparql-query.c" 2352 } 2353 2354 2355 static gchar* tracker_sparql_value_solution_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { 2356 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2357 if (collect_values[0].v_pointer) { 2358 #line 2359 "tracker-sparql-query.c" 2359 TrackerSparqlSolution* object; 2360 object = collect_values[0].v_pointer; 2361 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2362 if (object->parent_instance.g_class == NULL) { 2363 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2364 return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); 2365 #line 2366 "tracker-sparql-query.c" 2366 } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { 2367 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2368 return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); 2369 #line 2370 "tracker-sparql-query.c" 2370 } 2371 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2372 value->data[0].v_pointer = tracker_sparql_solution_ref (object); 2373 #line 2374 "tracker-sparql-query.c" 2374 } else { 2375 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2376 value->data[0].v_pointer = NULL; 2377 #line 2378 "tracker-sparql-query.c" 2378 } 2379 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2380 return NULL; 2381 #line 2382 "tracker-sparql-query.c" 2382 } 2383 2384 2385 static gchar* tracker_sparql_value_solution_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { 2386 TrackerSparqlSolution** object_p; 2387 object_p = collect_values[0].v_pointer; 2388 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2389 if (!object_p) { 2390 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2391 return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); 2392 #line 2393 "tracker-sparql-query.c" 2393 } 2394 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2395 if (!value->data[0].v_pointer) { 2396 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2397 *object_p = NULL; 2398 #line 2399 "tracker-sparql-query.c" 2399 } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { 2400 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2401 *object_p = value->data[0].v_pointer; 2402 #line 2403 "tracker-sparql-query.c" 2403 } else { 2404 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2405 *object_p = tracker_sparql_solution_ref (value->data[0].v_pointer); 2406 #line 2407 "tracker-sparql-query.c" 2407 } 2408 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2409 return NULL; 2410 #line 2411 "tracker-sparql-query.c" 2411 } 2412 2413 2414 GParamSpec* tracker_sparql_param_spec_solution (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { 2415 TrackerSparqlParamSpecSolution* spec; 2416 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2417 g_return_val_if_fail (g_type_is_a (object_type, TRACKER_SPARQL_TYPE_SOLUTION), NULL); 2418 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2419 spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); 2420 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2421 G_PARAM_SPEC (spec)->value_type = object_type; 2422 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2423 return G_PARAM_SPEC (spec); 2424 #line 2425 "tracker-sparql-query.c" 2425 } 2426 2427 2428 gpointer tracker_sparql_value_get_solution (const GValue* value) { 2429 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2430 g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_SPARQL_TYPE_SOLUTION), NULL); 2431 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2432 return value->data[0].v_pointer; 2433 #line 2434 "tracker-sparql-query.c" 2434 } 2435 2436 2437 void tracker_sparql_value_set_solution (GValue* value, gpointer v_object) { 2438 TrackerSparqlSolution* old; 2439 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2440 g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_SPARQL_TYPE_SOLUTION)); 2441 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2442 old = value->data[0].v_pointer; 2443 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2444 if (v_object) { 2445 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2446 g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TRACKER_SPARQL_TYPE_SOLUTION)); 2447 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2448 g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); 2449 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2450 value->data[0].v_pointer = v_object; 2451 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2452 tracker_sparql_solution_ref (value->data[0].v_pointer); 2453 #line 2454 "tracker-sparql-query.c" 2454 } else { 2455 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2456 value->data[0].v_pointer = NULL; 2457 #line 2458 "tracker-sparql-query.c" 2458 } 2459 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2460 if (old) { 2461 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2462 tracker_sparql_solution_unref (old); 2463 #line 2464 "tracker-sparql-query.c" 2464 } 2465 } 2466 2467 2468 void tracker_sparql_value_take_solution (GValue* value, gpointer v_object) { 2469 TrackerSparqlSolution* old; 2470 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2471 g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_SPARQL_TYPE_SOLUTION)); 2472 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2473 old = value->data[0].v_pointer; 2474 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2475 if (v_object) { 2476 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2477 g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TRACKER_SPARQL_TYPE_SOLUTION)); 2478 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2479 g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); 2480 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2481 value->data[0].v_pointer = v_object; 2482 #line 2483 "tracker-sparql-query.c" 2483 } else { 2484 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2485 value->data[0].v_pointer = NULL; 2486 #line 2487 "tracker-sparql-query.c" 2487 } 2488 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2489 if (old) { 2490 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2491 tracker_sparql_solution_unref (old); 2492 #line 2493 "tracker-sparql-query.c" 2493 } 2494 } 2495 2496 2497 static void tracker_sparql_solution_class_init (TrackerSparqlSolutionClass * klass) { 2498 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2499 tracker_sparql_solution_parent_class = g_type_class_peek_parent (klass); 2500 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2501 TRACKER_SPARQL_SOLUTION_CLASS (klass)->finalize = tracker_sparql_solution_finalize; 2502 #line 2503 "tracker-sparql-query.c" 2503 } 2504 2505 2506 static void tracker_sparql_solution_instance_init (TrackerSparqlSolution * self) { 2507 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2508 self->ref_count = 1; 2509 #line 2510 "tracker-sparql-query.c" 2510 } 2511 2512 2513 static void tracker_sparql_solution_finalize (TrackerSparqlSolution* obj) { 2514 TrackerSparqlSolution * self; 2515 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2516 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_SOLUTION, TrackerSparqlSolution); 2517 #line 172 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2518 _g_hash_table_unref0 (self->hash); 2519 #line 173 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2520 _g_ptr_array_unref0 (self->values); 2521 #line 2522 "tracker-sparql-query.c" 2522 } 2523 2524 2525 GType tracker_sparql_solution_get_type (void) { 2526 static volatile gsize tracker_sparql_solution_type_id__volatile = 0; 2527 if (g_once_init_enter (&tracker_sparql_solution_type_id__volatile)) { 2528 static const GTypeValueTable g_define_type_value_table = { tracker_sparql_value_solution_init, tracker_sparql_value_solution_free_value, tracker_sparql_value_solution_copy_value, tracker_sparql_value_solution_peek_pointer, "p", tracker_sparql_value_solution_collect_value, "p", tracker_sparql_value_solution_lcopy_value }; 2529 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlSolutionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_solution_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlSolution), 0, (GInstanceInitFunc) tracker_sparql_solution_instance_init, &g_define_type_value_table }; 2530 static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; 2531 GType tracker_sparql_solution_type_id; 2532 tracker_sparql_solution_type_id = g_type_register_fundamental (g_type_fundamental_next (), "TrackerSparqlSolution", &g_define_type_info, &g_define_type_fundamental_info, 0); 2533 g_once_init_leave (&tracker_sparql_solution_type_id__volatile, tracker_sparql_solution_type_id); 2534 } 2535 return tracker_sparql_solution_type_id__volatile; 2536 } 2537 2538 2539 gpointer tracker_sparql_solution_ref (gpointer instance) { 2540 TrackerSparqlSolution* self; 2541 self = instance; 2542 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2543 g_atomic_int_inc (&self->ref_count); 2544 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2545 return instance; 2546 #line 2547 "tracker-sparql-query.c" 2547 } 2548 2549 2550 void tracker_sparql_solution_unref (gpointer instance) { 2551 TrackerSparqlSolution* self; 2552 self = instance; 2553 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2554 if (g_atomic_int_dec_and_test (&self->ref_count)) { 2555 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2556 TRACKER_SPARQL_SOLUTION_GET_CLASS (self)->finalize (self); 2557 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2558 g_type_free_instance ((GTypeInstance *) self); 2559 #line 2560 "tracker-sparql-query.c" 2560 } 2561 } 2562 2563 2564 TrackerSparqlQuery* tracker_sparql_query_construct (GType object_type, const gchar* query) { 2565 TrackerSparqlQuery * self = NULL; 2566 TrackerSparqlQueryTokenInfo* _tmp0_ = NULL; 2567 GHashFunc _tmp1_; 2568 GEqualFunc _tmp2_; 2569 GDestroyNotify _tmp3_; 2570 GDestroyNotify _tmp4_; 2571 GHashTable* _tmp5_; 2572 guchar* _tmp6_ = NULL; 2573 guchar* _tmp7_; 2574 gint _tmp7__length1;
variable '_tmp7__length1' set but not used
(emitted by gcc)
2575 const gchar* _tmp8_; 2576 gchar* _tmp9_; 2577 TrackerSparqlExpression* _tmp10_; 2578 TrackerSparqlPattern* _tmp11_; 2579 #line 246 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2580 g_return_val_if_fail (query != NULL, NULL); 2581 #line 246 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2582 self = (TrackerSparqlQuery*) g_object_new (object_type, NULL); 2583 #line 247 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2584 tracker_sparql_query_set_no_cache (self, FALSE); 2585 #line 248 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2586 _tmp0_ = g_new0 (TrackerSparqlQueryTokenInfo, TRACKER_SPARQL_QUERY_BUFFER_SIZE); 2587 #line 248 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2588 self->priv->tokens = (g_free (self->priv->tokens), NULL); 2589 #line 248 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2590 self->priv->tokens = _tmp0_; 2591 #line 248 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2592 self->priv->tokens_length1 = TRACKER_SPARQL_QUERY_BUFFER_SIZE; 2593 #line 248 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2594 self->priv->_tokens_size_ = self->priv->tokens_length1; 2595 #line 249 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2596 _tmp1_ = g_str_hash; 2597 #line 249 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2598 _tmp2_ = g_str_equal; 2599 #line 249 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2600 _tmp3_ = g_free; 2601 #line 249 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2602 _tmp4_ = g_free; 2603 #line 249 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2604 _tmp5_ = g_hash_table_new_full (_tmp1_, _tmp2_, _tmp3_, _tmp4_); 2605 #line 249 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2606 _g_hash_table_unref0 (self->priv->prefix_map); 2607 #line 249 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2608 self->priv->prefix_map = _tmp5_; 2609 #line 251 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2610 _tmp6_ = g_new0 (guchar, 16); 2611 #line 251 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2612 self->priv->base_uuid = (g_free (self->priv->base_uuid), NULL); 2613 #line 251 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2614 self->priv->base_uuid = _tmp6_; 2615 #line 251 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2616 self->priv->base_uuid_length1 = 16; 2617 #line 251 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2618 self->priv->_base_uuid_size_ = self->priv->base_uuid_length1; 2619 #line 252 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2620 _tmp7_ = self->priv->base_uuid; 2621 #line 252 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2622 _tmp7__length1 = self->priv->base_uuid_length1;
Value stored to '_tmp7__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

2623 #line 252 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2624 uuid_generate (_tmp7_); 2625 #line 254 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2626 _tmp8_ = query; 2627 #line 254 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2628 _tmp9_ = g_strdup (_tmp8_); 2629 #line 254 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2630 _g_free0 (self->priv->query_string); 2631 #line 254 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2632 self->priv->query_string = _tmp9_; 2633 #line 256 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2634 _tmp10_ = tracker_sparql_expression_new (self); 2635 #line 256 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2636 _g_object_unref0 (self->expression); 2637 #line 256 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2638 self->expression = _tmp10_; 2639 #line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2640 _tmp11_ = tracker_sparql_pattern_new (self); 2641 #line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2642 _g_object_unref0 (self->pattern); 2643 #line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2644 self->pattern = _tmp11_; 2645 #line 246 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2646 return self; 2647 #line 2648 "tracker-sparql-query.c" 2648 } 2649 2650 2651 TrackerSparqlQuery* tracker_sparql_query_new (const gchar* query) { 2652 #line 246 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2653 return tracker_sparql_query_construct (TRACKER_SPARQL_TYPE_QUERY, query); 2654 #line 2655 "tracker-sparql-query.c" 2655 } 2656 2657 2658 TrackerSparqlQuery* tracker_sparql_query_construct_update (GType object_type, const gchar* query) { 2659 TrackerSparqlQuery * self = NULL; 2660 const gchar* _tmp0_; 2661 #line 260 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2662 g_return_val_if_fail (query != NULL, NULL); 2663 #line 261 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2664 _tmp0_ = query; 2665 #line 261 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2666 self = (TrackerSparqlQuery*) tracker_sparql_query_construct (object_type, _tmp0_); 2667 #line 262 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2668 self->priv->update_extensions = TRUE; 2669 #line 260 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2670 return self; 2671 #line 2672 "tracker-sparql-query.c" 2672 } 2673 2674 2675 TrackerSparqlQuery* tracker_sparql_query_new_update (const gchar* query) { 2676 #line 260 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2677 return tracker_sparql_query_construct_update (TRACKER_SPARQL_TYPE_QUERY, query); 2678 #line 2679 "tracker-sparql-query.c" 2679 } 2680 2681 2682 static glong string_strnlen (gchar* str, glong maxlen) { 2683 glong result = 0L; 2684 gchar* _tmp0_; 2685 glong _tmp1_; 2686 gchar* _tmp2_ = NULL; 2687 gchar* end; 2688 gchar* _tmp3_; 2689 #line 1147 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2690 _tmp0_ = str; 2691 #line 1147 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2692 _tmp1_ = maxlen; 2693 #line 1147 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2694 _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_); 2695 #line 1147 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2696 end = _tmp2_; 2697 #line 1148 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2698 _tmp3_ = end; 2699 #line 1148 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2700 if (_tmp3_ == NULL) { 2701 #line 2702 "tracker-sparql-query.c" 2702 glong _tmp4_; 2703 #line 1149 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2704 _tmp4_ = maxlen; 2705 #line 1149 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2706 result = _tmp4_; 2707 #line 1149 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2708 return result; 2709 #line 2710 "tracker-sparql-query.c" 2710 } else { 2711 gchar* _tmp5_; 2712 gchar* _tmp6_; 2713 #line 1151 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2714 _tmp5_ = end; 2715 #line 1151 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2716 _tmp6_ = str; 2717 #line 1151 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2718 result = (glong) (_tmp5_ - _tmp6_); 2719 #line 1151 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2720 return result; 2721 #line 2722 "tracker-sparql-query.c" 2722 } 2723 } 2724 2725 2726 static gchar* string_substring (const gchar* self, glong offset, glong len) { 2727 gchar* result = NULL; 2728 glong string_length = 0L; 2729 gboolean _tmp0_ = FALSE; 2730 glong _tmp1_; 2731 gboolean _tmp3_; 2732 glong _tmp9_; 2733 glong _tmp15_; 2734 glong _tmp18_; 2735 glong _tmp19_; 2736 glong _tmp20_; 2737 glong _tmp21_; 2738 glong _tmp22_; 2739 gchar* _tmp23_ = NULL; 2740 #line 1158 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2741 g_return_val_if_fail (self != NULL, NULL); 2742 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2743 _tmp1_ = offset; 2744 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2745 if (_tmp1_ >= ((glong) 0)) { 2746 #line 2747 "tracker-sparql-query.c" 2747 glong _tmp2_; 2748 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2749 _tmp2_ = len; 2750 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2751 _tmp0_ = _tmp2_ >= ((glong) 0); 2752 #line 2753 "tracker-sparql-query.c" 2753 } else { 2754 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2755 _tmp0_ = FALSE; 2756 #line 2757 "tracker-sparql-query.c" 2757 } 2758 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2759 _tmp3_ = _tmp0_; 2760 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2761 if (_tmp3_) { 2762 #line 2763 "tracker-sparql-query.c" 2763 glong _tmp4_; 2764 glong _tmp5_; 2765 glong _tmp6_ = 0L; 2766 #line 1162 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2767 _tmp4_ = offset; 2768 #line 1162 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2769 _tmp5_ = len; 2770 #line 1162 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2771 _tmp6_ = string_strnlen ((gchar*) self, _tmp4_ + _tmp5_); 2772 #line 1162 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2773 string_length = _tmp6_; 2774 #line 2775 "tracker-sparql-query.c" 2775 } else { 2776 gint _tmp7_; 2777 gint _tmp8_; 2778 #line 1164 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2779 _tmp7_ = strlen (self); 2780 #line 1164 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2781 _tmp8_ = _tmp7_; 2782 #line 1164 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2783 string_length = (glong) _tmp8_; 2784 #line 2785 "tracker-sparql-query.c" 2785 } 2786 #line 1167 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2787 _tmp9_ = offset; 2788 #line 1167 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2789 if (_tmp9_ < ((glong) 0)) { 2790 #line 2791 "tracker-sparql-query.c" 2791 glong _tmp10_; 2792 glong _tmp11_; 2793 glong _tmp12_; 2794 #line 1168 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2795 _tmp10_ = string_length; 2796 #line 1168 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2797 _tmp11_ = offset; 2798 #line 1168 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2799 offset = _tmp10_ + _tmp11_; 2800 #line 1169 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2801 _tmp12_ = offset; 2802 #line 1169 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2803 g_return_val_if_fail (_tmp12_ >= ((glong) 0), NULL); 2804 #line 2805 "tracker-sparql-query.c" 2805 } else { 2806 glong _tmp13_; 2807 glong _tmp14_; 2808 #line 1171 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2809 _tmp13_ = offset; 2810 #line 1171 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2811 _tmp14_ = string_length; 2812 #line 1171 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2813 g_return_val_if_fail (_tmp13_ <= _tmp14_, NULL); 2814 #line 2815 "tracker-sparql-query.c" 2815 } 2816 #line 1173 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2817 _tmp15_ = len; 2818 #line 1173 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2819 if (_tmp15_ < ((glong) 0)) { 2820 #line 2821 "tracker-sparql-query.c" 2821 glong _tmp16_; 2822 glong _tmp17_; 2823 #line 1174 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2824 _tmp16_ = string_length; 2825 #line 1174 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2826 _tmp17_ = offset; 2827 #line 1174 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2828 len = _tmp16_ - _tmp17_; 2829 #line 2830 "tracker-sparql-query.c" 2830 } 2831 #line 1176 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2832 _tmp18_ = offset; 2833 #line 1176 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2834 _tmp19_ = len; 2835 #line 1176 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2836 _tmp20_ = string_length; 2837 #line 1176 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2838 g_return_val_if_fail ((_tmp18_ + _tmp19_) <= _tmp20_, NULL); 2839 #line 1177 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2840 _tmp21_ = offset; 2841 #line 1177 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2842 _tmp22_ = len; 2843 #line 1177 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2844 _tmp23_ = g_strndup (((gchar*) self) + _tmp21_, (gsize) _tmp22_); 2845 #line 1177 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2846 result = _tmp23_; 2847 #line 1177 "/usr/share/vala-0.18/vapi/glib-2.0.vapi" 2848 return result; 2849 #line 2850 "tracker-sparql-query.c" 2850 } 2851 2852 2853 static gchar* tracker_sparql_query_get_uuid_for_name (TrackerSparqlQuery* self, guchar* base_uuid, int base_uuid_length1, const gchar* name) { 2854 gchar* result = NULL; 2855 GChecksum* _tmp0_; 2856 GChecksum* checksum; 2857 guchar* _tmp1_; 2858 gint _tmp1__length1;
variable '_tmp1__length1' set but not used
(emitted by gcc)
2859 const gchar* _tmp2_; 2860 const gchar* _tmp3_ = NULL; 2861 gchar* _tmp4_; 2862 gchar* sha1; 2863 gchar* _tmp5_ = NULL; 2864 gchar* _tmp6_; 2865 gchar* _tmp7_ = NULL; 2866 gchar* _tmp8_; 2867 gchar* _tmp9_ = NULL; 2868 gchar* _tmp10_; 2869 gchar* _tmp11_ = NULL; 2870 gchar* _tmp12_; 2871 gchar* _tmp13_ = NULL; 2872 gchar* _tmp14_; 2873 #line 265 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2874 g_return_val_if_fail (self != NULL, NULL); 2875 #line 265 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2876 g_return_val_if_fail (name != NULL, NULL); 2877 #line 266 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2878 _tmp0_ = g_checksum_new (G_CHECKSUM_SHA1); 2879 #line 266 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2880 checksum = _tmp0_; 2881 #line 268 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2882 _tmp1_ = base_uuid; 2883 #line 268 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2884 _tmp1__length1 = base_uuid_length1;
Value stored to '_tmp1__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

2885 #line 268 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2886 g_checksum_update (checksum, _tmp1_, (gsize) 16); 2887 #line 271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2888 _tmp2_ = name; 2889 #line 271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2890 g_checksum_update (checksum, (guchar*) _tmp2_, (gsize) (-1)); 2891 #line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2892 _tmp3_ = g_checksum_get_string (checksum); 2893 #line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2894 _tmp4_ = g_strdup (_tmp3_); 2895 #line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2896 sha1 = _tmp4_; 2897 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2898 _tmp5_ = string_substring (sha1, (glong) 8, (glong) (-1)); 2899 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2900 _tmp6_ = _tmp5_; 2901 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2902 _tmp7_ = string_substring (sha1, (glong) 12, (glong) (-1)); 2903 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2904 _tmp8_ = _tmp7_; 2905 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2906 _tmp9_ = string_substring (sha1, (glong) 16, (glong) (-1)); 2907 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2908 _tmp10_ = _tmp9_; 2909 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2910 _tmp11_ = string_substring (sha1, (glong) 20, (glong) (-1)); 2911 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2912 _tmp12_ = _tmp11_; 2913 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2914 _tmp13_ = g_strdup_printf ("urn:uuid:%.8s-%.4s-%.4s-%.4s-%.12s", sha1, _tmp6_, _tmp8_, _tmp10_, _tmp12_); 2915 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2916 _tmp14_ = _tmp13_; 2917 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2918 _g_free0 (_tmp12_); 2919 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2920 _g_free0 (_tmp10_); 2921 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2922 _g_free0 (_tmp8_); 2923 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2924 _g_free0 (_tmp6_); 2925 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2926 result = _tmp14_; 2927 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2928 _g_free0 (sha1); 2929 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2930 _g_checksum_free0 (checksum); 2931 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2932 return result; 2933 #line 2934 "tracker-sparql-query.c" 2934 } 2935 2936 2937 gchar* tracker_sparql_query_generate_bnodeid (TrackerSparqlQuery* self, const gchar* user_bnodeid) { 2938 gchar* result = NULL; 2939 const gchar* _tmp0_; 2940 #line 280 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2941 g_return_val_if_fail (self != NULL, NULL); 2942 #line 282 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2943 _tmp0_ = user_bnodeid; 2944 #line 282 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2945 if (_tmp0_ == NULL) { 2946 #line 2947 "tracker-sparql-query.c" 2947 gint _tmp1_; 2948 gint _tmp2_; 2949 gchar* _tmp3_ = NULL; 2950 #line 283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2951 _tmp1_ = self->priv->bnodeid; 2952 #line 283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2953 self->priv->bnodeid = _tmp1_ + 1; 2954 #line 283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2955 _tmp2_ = self->priv->bnodeid; 2956 #line 283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2957 _tmp3_ = g_strdup_printf (":%d", _tmp2_); 2958 #line 283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2959 result = _tmp3_; 2960 #line 283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2961 return result; 2962 #line 2963 "tracker-sparql-query.c" 2963 } else { 2964 gchar* uri; 2965 GHashTable* _tmp4_; 2966 guchar* _tmp10_; 2967 gint _tmp10__length1; 2968 const gchar* _tmp11_; 2969 gchar* _tmp12_ = NULL; 2970 GHashTable* _tmp13_; 2971 #line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2972 uri = NULL; 2973 #line 287 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2974 _tmp4_ = self->priv->blank_nodes; 2975 #line 287 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2976 if (_tmp4_ != NULL) { 2977 #line 2978 "tracker-sparql-query.c" 2978 GHashTable* _tmp5_; 2979 const gchar* _tmp6_; 2980 gconstpointer _tmp7_ = NULL; 2981 gchar* _tmp8_; 2982 const gchar* _tmp9_; 2983 #line 288 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2984 _tmp5_ = self->priv->blank_nodes; 2985 #line 288 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2986 _tmp6_ = user_bnodeid; 2987 #line 288 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2988 _tmp7_ = g_hash_table_lookup (_tmp5_, _tmp6_); 2989 #line 288 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2990 _tmp8_ = g_strdup ((const gchar*) _tmp7_); 2991 #line 288 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2992 _g_free0 (uri); 2993 #line 288 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2994 uri = _tmp8_; 2995 #line 289 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2996 _tmp9_ = uri; 2997 #line 289 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 2998 if (_tmp9_ != NULL) { 2999 #line 290 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3000 result = uri; 3001 #line 290 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3002 return result; 3003 #line 3004 "tracker-sparql-query.c" 3004 } 3005 } 3006 #line 294 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3007 _tmp10_ = self->priv->base_uuid; 3008 #line 294 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3009 _tmp10__length1 = self->priv->base_uuid_length1; 3010 #line 294 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3011 _tmp11_ = user_bnodeid; 3012 #line 294 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3013 _tmp12_ = tracker_sparql_query_get_uuid_for_name (self, _tmp10_, _tmp10__length1, _tmp11_); 3014 #line 294 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3015 _g_free0 (uri); 3016 #line 294 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3017 uri = _tmp12_; 3018 #line 296 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3019 _tmp13_ = self->priv->blank_nodes; 3020 #line 296 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3021 if (_tmp13_ != NULL) { 3022 #line 3023 "tracker-sparql-query.c" 3023 GHashTable* _tmp21_; 3024 const gchar* _tmp22_; 3025 gchar* _tmp23_; 3026 const gchar* _tmp24_; 3027 gchar* _tmp25_; 3028 #line 297 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3029 while (TRUE) { 3030 #line 3031 "tracker-sparql-query.c" 3031 const gchar* _tmp14_; 3032 gint _tmp15_ = 0; 3033 guchar* _tmp16_ = NULL; 3034 guchar* new_base_uuid; 3035 gint new_base_uuid_length1; 3036 gint _new_base_uuid_size_; 3037 guchar* _tmp17_; 3038 gint _tmp17__length1;
variable '_tmp17__length1' set but not used
(emitted by gcc)
3039 guchar* _tmp18_; 3040 gint _tmp18__length1; 3041 const gchar* _tmp19_; 3042 gchar* _tmp20_ = NULL; 3043 #line 297 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3044 _tmp14_ = uri; 3045 #line 297 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3046 _tmp15_ = tracker_data_query_resource_id (_tmp14_); 3047 #line 297 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3048 if (!(_tmp15_ > 0)) { 3049 #line 297 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3050 break; 3051 #line 3052 "tracker-sparql-query.c" 3052 } 3053 #line 299 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3054 _tmp16_ = g_new0 (guchar, 16); 3055 #line 299 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3056 new_base_uuid = _tmp16_; 3057 #line 299 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3058 new_base_uuid_length1 = 16; 3059 #line 299 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3060 _new_base_uuid_size_ = new_base_uuid_length1;
Value stored to '_new_base_uuid_size_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3061 #line 300 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3062 _tmp17_ = new_base_uuid; 3063 #line 300 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3064 _tmp17__length1 = new_base_uuid_length1;
Value stored to '_tmp17__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3065 #line 300 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3066 uuid_generate (_tmp17_); 3067 #line 301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3068 _tmp18_ = new_base_uuid; 3069 #line 301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3070 _tmp18__length1 = new_base_uuid_length1; 3071 #line 301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3072 _tmp19_ = user_bnodeid; 3073 #line 301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3074 _tmp20_ = tracker_sparql_query_get_uuid_for_name (self, _tmp18_, _tmp18__length1, _tmp19_); 3075 #line 301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3076 _g_free0 (uri); 3077 #line 301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3078 uri = _tmp20_; 3079 #line 297 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3080 new_base_uuid = (g_free (new_base_uuid), NULL); 3081 #line 3082 "tracker-sparql-query.c" 3082 } 3083 #line 304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3084 _tmp21_ = self->priv->blank_nodes; 3085 #line 304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3086 _tmp22_ = user_bnodeid; 3087 #line 304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3088 _tmp23_ = g_strdup (_tmp22_); 3089 #line 304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3090 _tmp24_ = uri; 3091 #line 304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3092 _tmp25_ = g_strdup (_tmp24_); 3093 #line 304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3094 g_hash_table_insert (_tmp21_, _tmp23_, _tmp25_); 3095 #line 3096 "tracker-sparql-query.c" 3096 } 3097 #line 307 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3098 result = uri; 3099 #line 307 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3100 return result; 3101 #line 3102 "tracker-sparql-query.c" 3102 } 3103 } 3104 3105 3106 gboolean tracker_sparql_query_next (TrackerSparqlQuery* self, GError** error) { 3107 gboolean result = FALSE; 3108 gint _tmp0_; 3109 gint _tmp1_; 3110 gint _tmp2_; 3111 TrackerSparqlQueryTokenInfo* _tmp16_; 3112 gint _tmp16__length1; 3113 gint _tmp17_; 3114 TrackerSparqlQueryTokenInfo _tmp18_; 3115 TrackerSparqlTokenType _tmp19_; 3116 GError * _inner_error_ = NULL; 3117 #line 311 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3118 g_return_val_if_fail (self != NULL, FALSE); 3119 #line 312 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3120 _tmp0_ = self->priv->index; 3121 #line 312 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3122 self->priv->index = (_tmp0_ + 1) % TRACKER_SPARQL_QUERY_BUFFER_SIZE; 3123 #line 313 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3124 _tmp1_ = self->priv->size; 3125 #line 313 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3126 self->priv->size = _tmp1_ - 1; 3127 #line 314 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3128 _tmp2_ = self->priv->size; 3129 #line 314 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3130 if (_tmp2_ <= 0) { 3131 #line 3132 "tracker-sparql-query.c" 3132 TrackerSourceLocation begin = {0};
Value stored to 'begin' during its initialization is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3133 TrackerSourceLocation end = {0};
Value stored to 'end' during its initialization is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3134 TrackerSparqlScanner* _tmp3_; 3135 TrackerSourceLocation _tmp4_ = {0}; 3136 TrackerSourceLocation _tmp5_ = {0}; 3137 TrackerSparqlTokenType _tmp6_ = 0; 3138 TrackerSparqlTokenType type; 3139 TrackerSparqlQueryTokenInfo* _tmp7_; 3140 gint _tmp7__length1; 3141 gint _tmp8_; 3142 TrackerSparqlTokenType _tmp9_; 3143 TrackerSparqlQueryTokenInfo* _tmp10_; 3144 gint _tmp10__length1; 3145 gint _tmp11_; 3146 TrackerSourceLocation _tmp12_; 3147 TrackerSparqlQueryTokenInfo* _tmp13_; 3148 gint _tmp13__length1;
variable '_tmp13__length1' set but not used
(emitted by gcc)
3149 gint _tmp14_; 3150 TrackerSourceLocation _tmp15_; 3151 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3152 _tmp3_ = self->priv->scanner; 3153 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3154 _tmp6_ = tracker_sparql_scanner_read_token (_tmp3_, &_tmp4_, &_tmp5_, &_inner_error_); 3155 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3156 begin = _tmp4_; 3157 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3158 end = _tmp5_; 3159 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3160 type = _tmp6_; 3161 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3162 if (_inner_error_ != NULL) { 3163 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3164 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) { 3165 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3166 g_propagate_error (error, _inner_error_); 3167 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3168 return FALSE; 3169 #line 3170 "tracker-sparql-query.c" 3170 } else { 3171 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3172 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 3173 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3174 g_clear_error (&_inner_error_); 3175 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3176 return FALSE; 3177 #line 3178 "tracker-sparql-query.c" 3178 } 3179 } 3180 #line 317 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3181 _tmp7_ = self->priv->tokens; 3182 #line 317 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3183 _tmp7__length1 = self->priv->tokens_length1;
Value stored to '_tmp7__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3184 #line 317 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3185 _tmp8_ = self->priv->index; 3186 #line 317 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3187 _tmp9_ = type; 3188 #line 317 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3189 _tmp7_[_tmp8_].type = _tmp9_; 3190 #line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3191 _tmp10_ = self->priv->tokens; 3192 #line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3193 _tmp10__length1 = self->priv->tokens_length1;
Value stored to '_tmp10__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3194 #line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3195 _tmp11_ = self->priv->index; 3196 #line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3197 _tmp12_ = begin; 3198 #line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3199 _tmp10_[_tmp11_].begin = _tmp12_; 3200 #line 319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3201 _tmp13_ = self->priv->tokens; 3202 #line 319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3203 _tmp13__length1 = self->priv->tokens_length1;
Value stored to '_tmp13__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3204 #line 319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3205 _tmp14_ = self->priv->index; 3206 #line 319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3207 _tmp15_ = end; 3208 #line 319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3209 _tmp13_[_tmp14_].end = _tmp15_; 3210 #line 320 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3211 self->priv->size = 1; 3212 #line 3213 "tracker-sparql-query.c" 3213 } 3214 #line 322 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3215 _tmp16_ = self->priv->tokens; 3216 #line 322 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3217 _tmp16__length1 = self->priv->tokens_length1;
Value stored to '_tmp16__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3218 #line 322 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3219 _tmp17_ = self->priv->index; 3220 #line 322 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3221 _tmp18_ = _tmp16_[_tmp17_]; 3222 #line 322 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3223 _tmp19_ = _tmp18_.type; 3224 #line 322 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3225 result = _tmp19_ != TRACKER_SPARQL_TOKEN_TYPE_EOF; 3226 #line 322 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3227 return result; 3228 #line 3229 "tracker-sparql-query.c" 3229 } 3230 3231 3232 TrackerSparqlTokenType tracker_sparql_query_current (TrackerSparqlQuery* self) { 3233 TrackerSparqlTokenType result = 0; 3234 TrackerSparqlQueryTokenInfo* _tmp0_; 3235 gint _tmp0__length1;
variable '_tmp0__length1' set but not used
(emitted by gcc)
3236 gint _tmp1_; 3237 TrackerSparqlQueryTokenInfo _tmp2_; 3238 TrackerSparqlTokenType _tmp3_; 3239 #line 325 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3240 g_return_val_if_fail (self != NULL, 0); 3241 #line 326 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3242 _tmp0_ = self->priv->tokens; 3243 #line 326 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3244 _tmp0__length1 = self->priv->tokens_length1;
Value stored to '_tmp0__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3245 #line 326 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3246 _tmp1_ = self->priv->index; 3247 #line 326 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3248 _tmp2_ = _tmp0_[_tmp1_]; 3249 #line 326 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3250 _tmp3_ = _tmp2_.type; 3251 #line 326 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3252 result = _tmp3_; 3253 #line 326 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3254 return result; 3255 #line 3256 "tracker-sparql-query.c" 3256 } 3257 3258 3259 TrackerSparqlTokenType tracker_sparql_query_last (TrackerSparqlQuery* self) { 3260 TrackerSparqlTokenType result = 0; 3261 gint _tmp0_; 3262 gint last_index; 3263 TrackerSparqlQueryTokenInfo* _tmp1_; 3264 gint _tmp1__length1;
variable '_tmp1__length1' set but not used
(emitted by gcc)
3265 TrackerSparqlQueryTokenInfo _tmp2_; 3266 TrackerSparqlTokenType _tmp3_; 3267 #line 329 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3268 g_return_val_if_fail (self != NULL, 0); 3269 #line 330 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3270 _tmp0_ = self->priv->index; 3271 #line 330 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3272 last_index = ((_tmp0_ + TRACKER_SPARQL_QUERY_BUFFER_SIZE) - 1) % TRACKER_SPARQL_QUERY_BUFFER_SIZE; 3273 #line 331 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3274 _tmp1_ = self->priv->tokens; 3275 #line 331 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3276 _tmp1__length1 = self->priv->tokens_length1;
Value stored to '_tmp1__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3277 #line 331 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3278 _tmp2_ = _tmp1_[last_index]; 3279 #line 331 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3280 _tmp3_ = _tmp2_.type; 3281 #line 331 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3282 result = _tmp3_; 3283 #line 331 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3284 return result; 3285 #line 3286 "tracker-sparql-query.c" 3286 } 3287 3288 3289 gboolean tracker_sparql_query_accept (TrackerSparqlQuery* self, TrackerSparqlTokenType type, GError** error) { 3290 gboolean result = FALSE; 3291 TrackerSparqlTokenType _tmp0_ = 0; 3292 TrackerSparqlTokenType _tmp1_; 3293 GError * _inner_error_ = NULL; 3294 #line 334 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3295 g_return_val_if_fail (self != NULL, FALSE); 3296 #line 335 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3297 _tmp0_ = tracker_sparql_query_current (self); 3298 #line 335 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3299 _tmp1_ = type; 3300 #line 335 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3301 if (_tmp0_ == _tmp1_) { 3302 #line 336 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3303 tracker_sparql_query_next (self, &_inner_error_); 3304 #line 336 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3305 if (_inner_error_ != NULL) { 3306 #line 336 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3307 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) { 3308 #line 336 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3309 g_propagate_error (error, _inner_error_); 3310 #line 336 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3311 return FALSE; 3312 #line 3313 "tracker-sparql-query.c" 3313 } else { 3314 #line 336 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3315 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 3316 #line 336 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3317 g_clear_error (&_inner_error_); 3318 #line 336 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3319 return FALSE; 3320 #line 3321 "tracker-sparql-query.c" 3321 } 3322 } 3323 #line 337 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3324 result = TRUE; 3325 #line 337 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3326 return result; 3327 #line 3328 "tracker-sparql-query.c" 3328 } 3329 #line 339 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3330 result = FALSE; 3331 #line 339 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3332 return result; 3333 #line 3334 "tracker-sparql-query.c" 3334 } 3335 3336 3337 GError* tracker_sparql_query_get_error (TrackerSparqlQuery* self, const gchar* msg) { 3338 GError* result = NULL; 3339 TrackerSparqlQueryTokenInfo* _tmp0_; 3340 gint _tmp0__length1; 3341 gint _tmp1_; 3342 TrackerSparqlQueryTokenInfo _tmp2_; 3343 TrackerSourceLocation _tmp3_; 3344 gint _tmp4_; 3345 TrackerSparqlQueryTokenInfo* _tmp5_; 3346 gint _tmp5__length1;
variable '_tmp5__length1' set but not used
(emitted by gcc)
3347 gint _tmp6_; 3348 TrackerSparqlQueryTokenInfo _tmp7_; 3349 TrackerSourceLocation _tmp8_; 3350 gint _tmp9_; 3351 const gchar* _tmp10_; 3352 gchar* _tmp11_ = NULL; 3353 gchar* _tmp12_; 3354 GError* _tmp13_; 3355 GError* _tmp14_; 3356 #line 342 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3357 g_return_val_if_fail (self != NULL, NULL); 3358 #line 342 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3359 g_return_val_if_fail (msg != NULL, NULL); 3360 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3361 _tmp0_ = self->priv->tokens; 3362 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3363 _tmp0__length1 = self->priv->tokens_length1;
Value stored to '_tmp0__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3364 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3365 _tmp1_ = self->priv->index; 3366 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3367 _tmp2_ = _tmp0_[_tmp1_]; 3368 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3369 _tmp3_ = _tmp2_.begin; 3370 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3371 _tmp4_ = _tmp3_.line; 3372 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3373 _tmp5_ = self->priv->tokens; 3374 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3375 _tmp5__length1 = self->priv->tokens_length1;
Value stored to '_tmp5__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3376 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3377 _tmp6_ = self->priv->index; 3378 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3379 _tmp7_ = _tmp5_[_tmp6_]; 3380 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3381 _tmp8_ = _tmp7_.begin; 3382 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3383 _tmp9_ = _tmp8_.column; 3384 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3385 _tmp10_ = msg; 3386 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3387 _tmp11_ = g_strdup_printf ("%d.%d: syntax error, %s", _tmp4_, _tmp9_, _tmp10_); 3388 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3389 _tmp12_ = _tmp11_; 3390 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3391 _tmp13_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_PARSE, _tmp12_); 3392 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3393 _tmp14_ = _tmp13_; 3394 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3395 _g_free0 (_tmp12_); 3396 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3397 result = _tmp14_; 3398 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3399 return result; 3400 #line 3401 "tracker-sparql-query.c" 3401 } 3402 3403 3404 GError* tracker_sparql_query_get_internal_error (TrackerSparqlQuery* self, const gchar* msg) { 3405 GError* result = NULL; 3406 TrackerSparqlQueryTokenInfo* _tmp0_; 3407 gint _tmp0__length1; 3408 gint _tmp1_; 3409 TrackerSparqlQueryTokenInfo _tmp2_; 3410 TrackerSourceLocation _tmp3_; 3411 gint _tmp4_; 3412 TrackerSparqlQueryTokenInfo* _tmp5_; 3413 gint _tmp5__length1;
variable '_tmp5__length1' set but not used
(emitted by gcc)
3414 gint _tmp6_; 3415 TrackerSparqlQueryTokenInfo _tmp7_; 3416 TrackerSourceLocation _tmp8_; 3417 gint _tmp9_; 3418 const gchar* _tmp10_; 3419 gchar* _tmp11_ = NULL; 3420 gchar* _tmp12_; 3421 GError* _tmp13_; 3422 GError* _tmp14_; 3423 #line 346 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3424 g_return_val_if_fail (self != NULL, NULL); 3425 #line 346 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3426 g_return_val_if_fail (msg != NULL, NULL); 3427 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3428 _tmp0_ = self->priv->tokens; 3429 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3430 _tmp0__length1 = self->priv->tokens_length1;
Value stored to '_tmp0__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3431 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3432 _tmp1_ = self->priv->index; 3433 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3434 _tmp2_ = _tmp0_[_tmp1_]; 3435 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3436 _tmp3_ = _tmp2_.begin; 3437 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3438 _tmp4_ = _tmp3_.line; 3439 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3440 _tmp5_ = self->priv->tokens; 3441 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3442 _tmp5__length1 = self->priv->tokens_length1;
Value stored to '_tmp5__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3443 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3444 _tmp6_ = self->priv->index; 3445 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3446 _tmp7_ = _tmp5_[_tmp6_]; 3447 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3448 _tmp8_ = _tmp7_.begin; 3449 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3450 _tmp9_ = _tmp8_.column; 3451 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3452 _tmp10_ = msg; 3453 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3454 _tmp11_ = g_strdup_printf ("%d.%d: %s", _tmp4_, _tmp9_, _tmp10_); 3455 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3456 _tmp12_ = _tmp11_; 3457 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3458 _tmp13_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_INTERNAL, _tmp12_); 3459 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3460 _tmp14_ = _tmp13_; 3461 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3462 _g_free0 (_tmp12_); 3463 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3464 result = _tmp14_; 3465 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3466 return result; 3467 #line 3468 "tracker-sparql-query.c" 3468 } 3469 3470 3471 gboolean tracker_sparql_query_expect (TrackerSparqlQuery* self, TrackerSparqlTokenType type, GError** error) { 3472 gboolean result = FALSE; 3473 TrackerSparqlTokenType _tmp0_; 3474 gboolean _tmp1_ = FALSE; 3475 gboolean _tmp2_; 3476 TrackerSparqlTokenType _tmp3_; 3477 const gchar* _tmp4_ = NULL; 3478 gchar* _tmp5_ = NULL; 3479 gchar* _tmp6_; 3480 GError* _tmp7_ = NULL; 3481 GError* _tmp8_; 3482 GError * _inner_error_ = NULL; 3483 #line 350 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3484 g_return_val_if_fail (self != NULL, FALSE); 3485 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3486 _tmp0_ = type; 3487 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3488 _tmp1_ = tracker_sparql_query_accept (self, _tmp0_, &_inner_error_); 3489 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3490 _tmp2_ = _tmp1_; 3491 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3492 if (_inner_error_ != NULL) { 3493 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3494 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) { 3495 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3496 g_propagate_error (error, _inner_error_); 3497 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3498 return FALSE; 3499 #line 3500 "tracker-sparql-query.c" 3500 } else { 3501 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3502 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 3503 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3504 g_clear_error (&_inner_error_); 3505 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3506 return FALSE; 3507 #line 3508 "tracker-sparql-query.c" 3508 } 3509 } 3510 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3511 if (_tmp2_) { 3512 #line 352 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3513 result = TRUE; 3514 #line 352 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3515 return result; 3516 #line 3517 "tracker-sparql-query.c" 3517 } 3518 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3519 _tmp3_ = type; 3520 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3521 _tmp4_ = tracker_sparql_token_type_to_string (_tmp3_); 3522 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3523 _tmp5_ = g_strdup_printf ("expected %s", _tmp4_); 3524 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3525 _tmp6_ = _tmp5_; 3526 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3527 _tmp7_ = tracker_sparql_query_get_error (self, _tmp6_); 3528 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3529 _tmp8_ = _tmp7_; 3530 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3531 _g_free0 (_tmp6_); 3532 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3533 _inner_error_ = _tmp8_; 3534 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3535 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) { 3536 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3537 g_propagate_error (error, _inner_error_); 3538 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3539 return FALSE; 3540 #line 3541 "tracker-sparql-query.c" 3541 } else { 3542 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3543 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 3544 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3545 g_clear_error (&_inner_error_); 3546 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3547 return FALSE; 3548 #line 3549 "tracker-sparql-query.c" 3549 } 3550 } 3551 3552 3553 void tracker_sparql_query_get_location (TrackerSparqlQuery* self, TrackerSourceLocation* result) { 3554 TrackerSparqlQueryTokenInfo* _tmp0_; 3555 gint _tmp0__length1;
variable '_tmp0__length1' set but not used
(emitted by gcc)
3556 gint _tmp1_; 3557 TrackerSparqlQueryTokenInfo _tmp2_; 3558 TrackerSourceLocation _tmp3_; 3559 #line 358 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3560 g_return_if_fail (self != NULL); 3561 #line 359 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3562 _tmp0_ = self->priv->tokens; 3563 #line 359 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3564 _tmp0__length1 = self->priv->tokens_length1;
Value stored to '_tmp0__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3565 #line 359 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3566 _tmp1_ = self->priv->index; 3567 #line 359 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3568 _tmp2_ = _tmp0_[_tmp1_]; 3569 #line 359 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3570 _tmp3_ = _tmp2_.begin; 3571 #line 359 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3572 *result = _tmp3_; 3573 #line 359 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3574 return; 3575 #line 3576 "tracker-sparql-query.c" 3576 } 3577 3578 3579 void tracker_sparql_query_set_location (TrackerSparqlQuery* self, TrackerSourceLocation* location) { 3580 TrackerSparqlScanner* _tmp0_; 3581 TrackerSourceLocation _tmp1_; 3582 GError * _inner_error_ = NULL; 3583 #line 362 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3584 g_return_if_fail (self != NULL); 3585 #line 362 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3586 g_return_if_fail (location != NULL); 3587 #line 363 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3588 _tmp0_ = self->priv->scanner; 3589 #line 363 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3590 _tmp1_ = *location; 3591 #line 363 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3592 tracker_sparql_scanner_seek (_tmp0_, &_tmp1_); 3593 #line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3594 self->priv->size = 0; 3595 #line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3596 self->priv->index = 0; 3597 #line 3598 "tracker-sparql-query.c" 3598 { 3599 #line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3600 tracker_sparql_query_next (self, &_inner_error_); 3601 #line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3602 if (_inner_error_ != NULL) { 3603 #line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3604 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) { 3605 #line 3606 "tracker-sparql-query.c" 3606 goto __catch2_tracker_sparql_error; 3607 } 3608 #line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3609 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 3610 #line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3611 g_clear_error (&_inner_error_); 3612 #line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3613 return; 3614 #line 3615 "tracker-sparql-query.c" 3615 } 3616 } 3617 goto __finally2; 3618 __catch2_tracker_sparql_error: 3619 { 3620 GError* e = NULL; 3621 #line 366 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3622 e = _inner_error_; 3623 #line 366 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3624 _inner_error_ = NULL; 3625 #line 370 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3626 g_critical ("internal error: next in set_location failed"); 3627 #line 366 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3628 _g_error_free0 (e); 3629 #line 3630 "tracker-sparql-query.c" 3630 } 3631 __finally2: 3632 #line 366 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3633 if (_inner_error_ != NULL) { 3634 #line 366 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3635 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 3636 #line 366 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3637 g_clear_error (&_inner_error_); 3638 #line 366 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3639 return; 3640 #line 3641 "tracker-sparql-query.c" 3641 } 3642 } 3643 3644 3645 gchar* tracker_sparql_query_get_last_string (TrackerSparqlQuery* self, gint strip) { 3646 gchar* result = NULL; 3647 gint _tmp0_; 3648 gint last_index; 3649 TrackerSparqlQueryTokenInfo* _tmp1_; 3650 gint _tmp1__length1; 3651 TrackerSparqlQueryTokenInfo _tmp2_; 3652 TrackerSourceLocation _tmp3_; 3653 gchar* _tmp4_; 3654 gint _tmp5_; 3655 TrackerSparqlQueryTokenInfo* _tmp6_; 3656 gint _tmp6__length1; 3657 TrackerSparqlQueryTokenInfo _tmp7_; 3658 TrackerSourceLocation _tmp8_; 3659 gchar* _tmp9_; 3660 TrackerSparqlQueryTokenInfo* _tmp10_; 3661 gint _tmp10__length1;
variable '_tmp10__length1' set but not used
(emitted by gcc)
3662 TrackerSparqlQueryTokenInfo _tmp11_; 3663 TrackerSourceLocation _tmp12_; 3664 gchar* _tmp13_; 3665 gint _tmp14_; 3666 gchar* _tmp15_ = NULL; 3667 #line 374 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3668 g_return_val_if_fail (self != NULL, NULL); 3669 #line 375 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3670 _tmp0_ = self->priv->index; 3671 #line 375 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3672 last_index = ((_tmp0_ + TRACKER_SPARQL_QUERY_BUFFER_SIZE) - 1) % TRACKER_SPARQL_QUERY_BUFFER_SIZE; 3673 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3674 _tmp1_ = self->priv->tokens; 3675 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3676 _tmp1__length1 = self->priv->tokens_length1;
Value stored to '_tmp1__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3677 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3678 _tmp2_ = _tmp1_[last_index]; 3679 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3680 _tmp3_ = _tmp2_.begin; 3681 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3682 _tmp4_ = _tmp3_.pos; 3683 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3684 _tmp5_ = strip; 3685 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3686 _tmp6_ = self->priv->tokens; 3687 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3688 _tmp6__length1 = self->priv->tokens_length1;
Value stored to '_tmp6__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3689 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3690 _tmp7_ = _tmp6_[last_index]; 3691 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3692 _tmp8_ = _tmp7_.end; 3693 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3694 _tmp9_ = _tmp8_.pos; 3695 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3696 _tmp10_ = self->priv->tokens; 3697 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3698 _tmp10__length1 = self->priv->tokens_length1;
Value stored to '_tmp10__length1' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

3699 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3700 _tmp11_ = _tmp10_[last_index]; 3701 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3702 _tmp12_ = _tmp11_.begin; 3703 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3704 _tmp13_ = _tmp12_.pos; 3705 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3706 _tmp14_ = strip; 3707 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3708 _tmp15_ = string_substring ((const gchar*) (_tmp4_ + _tmp5_), (glong) 0, (glong) ((gint) ((_tmp9_ - _tmp13_) - (2 * _tmp14_)))); 3709 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3710 result = _tmp15_; 3711 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3712 return result; 3713 #line 3714 "tracker-sparql-query.c" 3714 } 3715 3716 3717 static void tracker_sparql_query_parse_prologue (TrackerSparqlQuery* self, GError** error) { 3718 gboolean _tmp0_ = FALSE; 3719 gboolean _tmp1_; 3720 GError * _inner_error_ = NULL; 3721 #line 379 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3722 g_return_if_fail (self != NULL); 3723 #line 380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3724 _tmp0_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_BASE, &_inner_error_); 3725 #line 380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3726 _tmp1_ = _tmp0_; 3727 #line 380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3728 if (_inner_error_ != NULL) { 3729 #line 380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3730 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) { 3731 #line 380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3732 g_propagate_error (error, _inner_error_); 3733 #line 380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3734 return; 3735 #line 3736 "tracker-sparql-query.c" 3736 } else { 3737 #line 380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3738 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 3739 #line 380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3740 g_clear_error (&_inner_error_); 3741 #line 380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3742 return; 3743 #line 3744 "tracker-sparql-query.c" 3744 } 3745 } 3746 #line 380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3747 if (_tmp1_) { 3748 #line 381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3749 tracker_sparql_query_expect (self, TRACKER_SPARQL_TOKEN_TYPE_IRI_REF, &_inner_error_); 3750 #line 381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3751 if (_inner_error_ != NULL) { 3752 #line 381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3753 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) { 3754 #line 381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3755 g_propagate_error (error, _inner_error_); 3756 #line 381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3757 return; 3758 #line 3759 "tracker-sparql-query.c" 3759 } else { 3760 #line 381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3761 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 3762 #line 381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3763 g_clear_error (&_inner_error_); 3764 #line 381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3765 return; 3766 #line 3767 "tracker-sparql-query.c" 3767 } 3768 } 3769 } 3770 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3771 while (TRUE) { 3772 #line 3773 "tracker-sparql-query.c" 3773 gboolean _tmp2_ = FALSE; 3774 gboolean _tmp3_; 3775 gchar* _tmp4_; 3776 gchar* ns; 3777 gboolean _tmp5_ = FALSE; 3778 gboolean _tmp6_; 3779 gchar* _tmp8_ = NULL; 3780 gchar* uri; 3781 GHashTable* _tmp9_; 3782 const gchar* _tmp10_; 3783 gchar* _tmp11_; 3784 const gchar* _tmp12_; 3785 gchar* _tmp13_; 3786 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3787 _tmp2_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_PREFIX, &_inner_error_); 3788 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3789 _tmp3_ = _tmp2_; 3790 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3791 if (_inner_error_ != NULL) { 3792 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3793 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) { 3794 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3795 g_propagate_error (error, _inner_error_); 3796 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3797 return; 3798 #line 3799 "tracker-sparql-query.c" 3799 } else { 3800 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala" 3801 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 3802 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparq