Changeset 15015
- Timestamp:
- 02/16/08 12:05:07 (10 months ago)
- Files:
-
- trunk/midgard/apis/php5/php_midgard_connection.c (modified) (2 diffs)
- trunk/midgard/apis/python/py_midgard_connection.c (modified) (2 diffs)
- trunk/midgard/core/midgard/autogen.sh (modified) (1 diff)
- trunk/midgard/core/midgard/midgard/midgard_connection.h (modified) (6 diffs)
- trunk/midgard/core/midgard/src/midgard_config.c (modified) (2 diffs)
- trunk/midgard/core/midgard/src/midgard_connection.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midgard/apis/php5/php_midgard_connection.c
r14751 r15015 190 190 191 191 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); 194 193 195 194 if(hash != NULL) … … 228 227 229 228 GHashTable *hash = NULL; 230 rv = midgard_connection_open_config(mgd, config, &hash , NULL);229 rv = midgard_connection_open_config(mgd, config, &hash); 231 230 232 231 if(hash) trunk/midgard/apis/python/py_midgard_connection.c
r14813 r15015 88 88 MIDGARD_CONNECTION(self->obj), 89 89 (const gchar *)name, 90 &hashtable , NULL);90 &hashtable); 91 91 if(hashtable) 92 92 g_hash_table_destroy(hashtable); … … 117 117 MIDGARD_CONNECTION(self->obj), 118 118 MIDGARD_CONFIG(_config->obj), 119 &hashtable , NULL);119 &hashtable); 120 120 if(hashtable) 121 121 g_hash_table_destroy(hashtable); trunk/midgard/core/midgard/autogen.sh
r11241 r15015 4 4 configure_options="$@" 5 5 6 autoconf 7 automake 6 if [ ! -d m4 ] ; then 7 echo "Run 'gettextize --no-changelog -f' before running autogen.sh'" 8 exit 1 9 fi 10 11 autoheader 12 aclocal -I m4 13 libtoolize --force 14 automake -f -c -a 15 autoconf 8 16 9 17 $src_dir/configure $configure_options trunk/midgard/core/midgard/midgard/midgard_connection.h
r14067 r15015 56 56 /* class members */ 57 57 gboolean (*open) (MidgardConnection *mgd, 58 const char *name, GHashTable **hash , GError *err);58 const char *name, GHashTable **hash); 59 59 gboolean (*open_config) (MidgardConnection *mgd, 60 MidgardConfig *config, GHashTable **hash , GError *err);60 MidgardConfig *config, GHashTable **hash); 61 61 void (*close) (MidgardConnection *mgd); 62 62 … … 153 153 * 154 154 * 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 optional156 * \c error argument.155 * then \c NULL is returned and an error message is written to the global midgard 156 * \c error state. 157 157 * 158 158 * \param[in] mgd newly initialized MidgardConnection object 159 159 * \param[in] name the name of the Midgard database configuration 160 160 * \param[in] hashtable table to store reusable cache data 161 * \param[out] error placeholder for an error message, or \c NULL162 161 * \return Midgard connection, or \c NULL 163 162 * … … 173 172 * MidgardConnection *mgd = midgard_connection_new(); 174 173 * 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); 178 176 * 179 177 * if(hash) g_hash_table_destroy(hash); … … 184 182 extern gboolean midgard_connection_open( 185 183 MidgardConnection *mgd, const char *name, 186 GHashTable **hashtable , GError *error);184 GHashTable **hashtable); 187 185 188 186 /** … … 197 195 * \param[in] config Midgard configuration object 198 196 * \param[in] hashtable table to stroe reusable cache data 199 * \param[out] error placeholder for an error message, or \c NULL200 197 * \return Midgard connection, or \c NULL 201 198 * … … 205 202 extern gboolean midgard_connection_open_config( 206 203 MidgardConnection *mgd, MidgardConfig *config, 207 GHashTable **hashtable , GError *error);204 GHashTable **hashtable); 208 205 209 206 /** trunk/midgard/core/midgard/src/midgard_config.c
r14257 r15015 689 689 MidgardConnection *midgard_config_init(const gchar *filename) 690 690 { 691 GError *err = NULL;692 691 MidgardConnection *mgd = midgard_connection_new(); 693 692 … … 704 703 705 704 GHashTable *hash = NULL; 706 if(!midgard_connection_open_config(mgd, config, &hash , err)){705 if(!midgard_connection_open_config(mgd, config, &hash)){ 707 706 g_object_unref(mgd); 708 707 g_object_unref(config); trunk/midgard/core/midgard/src/midgard_connection.c
r14067 r15015 585 585 gboolean __midgard_connection_open( 586 586 MidgardConnection *mgd, 587 GHashTable **hashtable, GError *err,gboolean init_schema)587 GHashTable **hashtable, gboolean init_schema) 588 588 { 589 589 g_return_val_if_fail(mgd != NULL, FALSE); … … 757 757 gboolean midgard_connection_open( 758 758 MidgardConnection *mgd, const char *name, 759 GHashTable **hash , GError *err)759 GHashTable **hash) 760 760 { 761 761 g_assert(mgd != NULL); 762 762 g_assert (name != NULL); 763 g_assert(err == NULL);764 763 765 764 if(mgd->priv->config != NULL){ … … 769 768 "MidgardConfig already associated with " 770 769 "MidgardConnection"); 771 if(err)772 g_warning("%s", err->message);773 770 return FALSE; 774 771 } … … 780 777 mgd->priv->config = config; 781 778 782 if(!__midgard_connection_open(mgd, hash, err,TRUE))779 if(!__midgard_connection_open(mgd, hash, TRUE)) 783 780 return FALSE; 784 781 … … 789 786 gboolean midgard_connection_open_config( 790 787 MidgardConnection *mgd, MidgardConfig *config, 791 GHashTable **hashtable , GError *err)788 GHashTable **hashtable) 792 789 { 793 790 g_assert(mgd != NULL); 794 791 g_assert(config != NULL); 795 g_assert(err == NULL);796 792 797 793 mgd->priv->config = config; 798 794 799 if(!__midgard_connection_open(mgd, hashtable, err,TRUE))795 if(!__midgard_connection_open(mgd, hashtable, TRUE)) 800 796 return FALSE; 801 797 … … 805 801 gboolean midgard_connection_struct_open_config( 806 802 MidgardConnection *mgd, MidgardConfig *config, 807 GHashTable **hashtable , GError *err)803 GHashTable **hashtable) 808 804 { 809 805 g_assert(mgd != NULL); 810 806 g_assert(config != NULL); 811 g_assert(err == NULL);812 807 813 808 mgd->priv->config = config; 814 809 815 if(!__midgard_connection_open(mgd, hashtable, err,FALSE))810 if(!__midgard_connection_open(mgd, hashtable, FALSE)) 816 811 return FALSE; 817 812
