~ubuntu-branches/ubuntu/utopic/anjuta/utopic-proposed

« back to all changes in this revision

Viewing changes to plugins/symbol-db/symbol-db-engine-core.c

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson, Jackson Doak
  • Date: 2014-07-12 15:17:39 UTC
  • mfrom: (1.4.14)
  • Revision ID: package-import@ubuntu.com-20140712151739-p9xy0ntlgbpm2nxq
Tags: 2:3.12.0-1
* Team upload.

[ Jackson Doak ]
* New upstream release
* Drop 03_valac_0.22.patch, fixed upstream\
* debian/control:
  - Bump b-dep version on libgtk-3-dev (>= 3.6.0), libglib2.0-dev (>= 2.34.0)
  - Bump stardards-version to 3.9.5. No changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
140
140
 */
141
141
typedef struct _UpdateFileSymbolsData { 
142
142
        gchar *project;
 
143
        gchar *project_directory;
143
144
        gboolean update_prj_analyse_time;
144
145
        GPtrArray * files_path;
145
146
        
178
179
sdb_engine_add_new_symbol (SymbolDBEngine * dbe, const tagEntry * tag_entry,
179
180
                                                   int file_defined_id, gboolean sym_update);
180
181
 
181
 
GNUC_INLINE const GdaStatement *
 
182
const GdaStatement *
182
183
sdb_engine_get_statement_by_query_id (SymbolDBEngine * dbe, static_query_type query_id);
183
184
 
184
 
GNUC_INLINE const GdaSet *
185
 
sdb_engine_get_query_parameters_list (SymbolDBEngine *dbe, static_query_type query_id);
186
 
 
187
 
GNUC_INLINE gint
188
 
sdb_engine_get_tuple_id_by_unique_name (SymbolDBEngine * dbe, static_query_type qtype,
189
 
                                                                                gchar * param_key,
190
 
                                                                                GValue * param_value);
191
 
 
192
185
/*
193
186
 * implementation starts here 
194
187
 */
418
411
 * these queries are time-critical.
419
412
 * A GdaSet will also be populated once, avoiding so to create again later on.
420
413
 */
421
 
GNUC_INLINE const GdaStatement *
 
414
const GdaStatement *
422
415
sdb_engine_get_statement_by_query_id (SymbolDBEngine * dbe, static_query_type query_id)
423
416
{
424
417
        static_query_node *node;
465
458
 * Return a GdaSet of parameters calculated from the statement. It does not check
466
459
 * if it's null. You *must* be sure to have called sdb_engine_get_statement_by_query_id () first.
467
460
 */
468
 
GNUC_INLINE const GdaSet *
 
461
static GNUC_INLINE const GdaSet *
469
462
sdb_engine_get_query_parameters_list (SymbolDBEngine *dbe, static_query_type query_id)
470
463
{
471
464
        SymbolDBEnginePriv *priv;
545
538
 *
546
539
 * @return -1 on error. Otherwise the id of tuple.
547
540
 */
548
 
GNUC_INLINE gint
 
541
static GNUC_INLINE gint
549
542
sdb_engine_get_tuple_id_by_unique_name (SymbolDBEngine * dbe, static_query_type qtype,
550
543
                                                                                gchar * param_key,
551
544
                                                                                GValue * param_value)
2661
2654
        
2662
2655
        g_free (priv->db_directory);
2663
2656
        priv->db_directory = NULL;
2664
 
        
 
2657
 
2665
2658
        g_free (priv->project_directory);
2666
2659
        priv->project_directory = NULL; 
2667
2660
        
5207
5200
        {
5208
5201
                gchar *node = (gchar *) g_ptr_array_index (files_to_scan, i);
5209
5202
                
5210
 
                if (strstr (node, priv->project_directory) == NULL) 
 
5203
                if (strstr (node, update_data->project_directory) == NULL) 
5211
5204
                {
5212
5205
                        g_warning ("node %s is shorter than "
5213
5206
                                           "prj_directory %s",
5214
 
                                           node, priv->project_directory);
 
5207
                                           node, update_data->project_directory);
5215
5208
                        continue;
5216
5209
                }
5217
5210
                
5218
5211
                /* clean the db from old un-updated with the last update step () */
5219
5212
                if (sdb_engine_update_file (dbe, node + 
5220
 
                                                                        strlen (priv->project_directory)) == FALSE)
 
5213
                                                                        strlen (update_data->project_directory)) == FALSE)
5221
5214
                {
5222
5215
                        g_warning ("Error processing file %s", node + 
5223
 
                                           strlen (priv->project_directory));
 
5216
                                           strlen (update_data->project_directory));
5224
5217
                        return;
5225
5218
                }
5226
5219
        }
5272
5265
        g_ptr_array_unref (files_to_scan);
5273
5266
 
5274
5267
        g_free (update_data->project);
 
5268
        g_free (update_data->project_directory);
5275
5269
        g_free (update_data);
5276
5270
}
5277
5271
 
5340
5334
        update_data->update_prj_analyse_time = update_prj_analyse_time;
5341
5335
        update_data->files_path = ready_files;
5342
5336
        update_data->project = g_strdup (project);
 
5337
        update_data->project_directory = g_strdup (priv->project_directory);
5343
5338
 
5344
5339
        
5345
5340
        /* data will be freed when callback will be called. The signal will be