Changeset 15015

Show
Ignore:
Timestamp:
02/16/08 12:05:07 (10 months ago)
Author:
ab
Message:

Remove GError* from a MidgardConnection? open call. It is not needed there at all

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midgard/apis/php5/php_midgard_connection.c

    r14751 r15015  
    190190 
    191191        GHashTable *hash = NULL; 
    192         rv = midgard_connection_open(mgd, (const gchar *)cnf_name,  
    193                         &hash, NULL); 
     192        rv = midgard_connection_open(mgd, (const gchar *)cnf_name, &hash); 
    194193 
    195194        if(hash != NULL) 
     
    228227         
    229228        GHashTable *hash = NULL; 
    230         rv = midgard_connection_open_config(mgd, config, &hash, NULL); 
     229        rv = midgard_connection_open_config(mgd, config, &hash); 
    231230 
    232231        if(hash) 
  • trunk/midgard/apis/python/py_midgard_connection.c

    r14813 r15015  
    8888                                MIDGARD_CONNECTION(self->obj), 
    8989                                (const gchar *)name,  
    90                                 &hashtable, NULL); 
     90                                &hashtable); 
    9191        if(hashtable) 
    9292                g_hash_table_destroy(hashtable); 
     
    117117                                MIDGARD_CONNECTION(self->obj), 
    118118                                MIDGARD_CONFIG(_config->obj),  
    119                                 &hashtable, NULL); 
     119                                &hashtable); 
    120120        if(hashtable) 
    121121                g_hash_table_destroy(hashtable); 
  • trunk/midgard/core/midgard/autogen.sh

    r11241 r15015  
    44configure_options="$@" 
    55 
    6 autoconf  
    7 automake 
     6if [ ! -d m4 ] ; then 
     7     echo "Run 'gettextize --no-changelog -f' before running autogen.sh'" 
     8     exit 1 
     9fi 
     10 
     11autoheader 
     12aclocal -I m4 
     13libtoolize --force 
     14automake -f -c -a 
     15autoconf 
    816 
    917$src_dir/configure $configure_options 
  • trunk/midgard/core/midgard/midgard/midgard_connection.h

    r14067 r15015  
    5656        /* class members */ 
    5757        gboolean (*open) (MidgardConnection *mgd,  
    58                         const char *name, GHashTable **hash, GError *err); 
     58                        const char *name, GHashTable **hash); 
    5959        gboolean (*open_config) (MidgardConnection *mgd,  
    60                         MidgardConfig *config, GHashTable **hash, GError *err); 
     60                        MidgardConfig *config, GHashTable **hash); 
    6161        void (*close) (MidgardConnection *mgd); 
    6262         
     
    153153 * 
    154154 * If the named database configuration can not be read or the connection fails, 
    155  * then \c NULL is returned and an error message is written to the optional 
    156  * \c error argument
     155 * then \c NULL is returned and an error message is written to the global midgard 
     156 * \c error state
    157157 * 
    158158 * \param[in] mgd newly initialized MidgardConnection object    
    159159 * \param[in] name the name of the Midgard database configuration 
    160160 * \param[in] hashtable table to store reusable cache data 
    161  * \param[out] error placeholder for an error message, or \c NULL 
    162161 * \return Midgard connection, or \c NULL 
    163162 * 
     
    173172 *      MidgardConnection *mgd = midgard_connection_new(); 
    174173 *      const gchar *name = "myconfig"; 
    175  *      GError *error = NULL; 
    176  * 
    177  *      midgard_connection_open(mgd, name, &hash, error); 
     174 * 
     175 *      midgard_connection_open(mgd, name, &hash); 
    178176 * 
    179177 *      if(hash) g_hash_table_destroy(hash); 
     
    184182extern gboolean midgard_connection_open( 
    185183                MidgardConnection *mgd, const char *name,  
    186                 GHashTable **hashtable, GError *error); 
     184                GHashTable **hashtable); 
    187185 
    188186/** 
     
    197195 * \param[in] config Midgard configuration object 
    198196 * \param[in] hashtable table to stroe reusable cache data 
    199  * \param[out] error  placeholder for an error message, or \c NULL 
    200197 * \return Midgard connection, or \c NULL 
    201198 * 
     
    205202extern gboolean midgard_connection_open_config( 
    206203                MidgardConnection *mgd, MidgardConfig *config,  
    207                 GHashTable **hashtable, GError *error); 
     204                GHashTable **hashtable); 
    208205 
    209206/** 
  • trunk/midgard/core/midgard/src/midgard_config.c

    r14257 r15015  
    689689MidgardConnection *midgard_config_init(const gchar *filename) 
    690690{ 
    691         GError *err = NULL; 
    692691        MidgardConnection *mgd = midgard_connection_new(); 
    693692 
     
    704703 
    705704        GHashTable *hash = NULL; 
    706         if(!midgard_connection_open_config(mgd, config, &hash, err)){ 
     705        if(!midgard_connection_open_config(mgd, config, &hash)){ 
    707706                g_object_unref(mgd); 
    708707                g_object_unref(config); 
  • trunk/midgard/core/midgard/src/midgard_connection.c

    r14067 r15015  
    585585gboolean __midgard_connection_open( 
    586586                MidgardConnection *mgd,  
    587                 GHashTable **hashtable, GError *err, gboolean init_schema) 
     587                GHashTable **hashtable, gboolean init_schema) 
    588588{ 
    589589        g_return_val_if_fail(mgd != NULL, FALSE); 
     
    757757gboolean midgard_connection_open( 
    758758                MidgardConnection *mgd, const char *name,  
    759                 GHashTable **hash, GError *err
     759                GHashTable **hash
    760760{        
    761761        g_assert(mgd != NULL); 
    762762        g_assert (name != NULL); 
    763         g_assert(err == NULL); 
    764763         
    765764        if(mgd->priv->config != NULL){ 
     
    769768                                "MidgardConfig already associated with " 
    770769                                "MidgardConnection"); 
    771                 if(err) 
    772                         g_warning("%s", err->message); 
    773770                return FALSE; 
    774771        } 
     
    780777        mgd->priv->config = config; 
    781778 
    782         if(!__midgard_connection_open(mgd, hash, err, TRUE)) 
     779        if(!__midgard_connection_open(mgd, hash, TRUE)) 
    783780                return FALSE; 
    784781 
     
    789786gboolean midgard_connection_open_config( 
    790787                MidgardConnection *mgd, MidgardConfig *config,  
    791                 GHashTable **hashtable, GError *err
     788                GHashTable **hashtable
    792789{ 
    793790        g_assert(mgd != NULL);   
    794791        g_assert(config != NULL); 
    795         g_assert(err == NULL); 
    796792 
    797793        mgd->priv->config = config; 
    798794         
    799         if(!__midgard_connection_open(mgd, hashtable, err, TRUE)) 
     795        if(!__midgard_connection_open(mgd, hashtable, TRUE)) 
    800796                return FALSE; 
    801797         
     
    805801gboolean midgard_connection_struct_open_config( 
    806802                MidgardConnection *mgd, MidgardConfig *config,  
    807                 GHashTable **hashtable, GError *err
     803                GHashTable **hashtable
    808804{ 
    809805        g_assert(mgd != NULL); 
    810806        g_assert(config != NULL); 
    811         g_assert(err == NULL); 
    812807         
    813808        mgd->priv->config = config; 
    814809         
    815         if(!__midgard_connection_open(mgd, hashtable, err, FALSE)) 
     810        if(!__midgard_connection_open(mgd, hashtable, FALSE)) 
    816811                return FALSE; 
    817812