comparison src/number.c @ 5141:0dcd22290039

fix issues with finalizers in number.c, postgresql, ldap -------------------- ChangeLog entries follow: -------------------- modules/ChangeLog addition: 2010-03-07 Ben Wing <ben@xemacs.org> * postgresql/postgresql.c (finalize_pgconn): * postgresql/postgresql.c (finalize_pgresult): * ldap/eldap.c (finalize_ldap): Fix the finalizers to go with the new calling sequence. Done previously but somehow got lost. src/ChangeLog addition: 2010-03-07 Ben Wing <ben@xemacs.org> * number.c (bignum_finalize): * number.c (ratio_finalize): * number.c (bigfloat_finalize): Fix the finalizers to go with the new calling sequence. Done previously but somehow got lost.
author Ben Wing <ben@xemacs.org>
date Sun, 07 Mar 2010 19:26:04 -0600
parents b5df3737028a
children 6c6d78781d59
comparison
equal deleted inserted replaced
5135:59bac09f31d2 5141:0dcd22290039
59 xfree (bstr); 59 xfree (bstr);
60 } 60 }
61 61
62 #ifdef NEW_GC 62 #ifdef NEW_GC
63 static void 63 static void
64 bignum_finalize (void *header) 64 bignum_finalize (Lisp_Object obj)
65 { 65 {
66 struct Lisp_Bignum *num = (struct Lisp_Bignum *) header; 66 struct Lisp_Bignum *num = XBIGNUM (obj);
67 /* #### WARNING: It would be better to put some sort of check to make 67 /* #### WARNING: It would be better to put some sort of check to make
68 sure this doesn't happen more than once, just in case --- 68 sure this doesn't happen more than once, just in case ---
69 e.g. checking if it's zero before finalizing and then setting it to 69 e.g. checking if it's zero before finalizing and then setting it to
70 zero after finalizing. */ 70 zero after finalizing. */
71 bignum_fini (num->data); 71 bignum_fini (num->data);
153 xfree (rstr); 153 xfree (rstr);
154 } 154 }
155 155
156 #ifdef NEW_GC 156 #ifdef NEW_GC
157 static void 157 static void
158 ratio_finalize (void *header) 158 ratio_finalize (Lisp_Object obj)
159 { 159 {
160 struct Lisp_Ratio *num = (struct Lisp_Ratio *) header; 160 struct Lisp_Ratio *num = XRATIO (obj);
161 /* #### WARNING: It would be better to put some sort of check to make 161 /* #### WARNING: It would be better to put some sort of check to make
162 sure this doesn't happen more than once, just in case --- 162 sure this doesn't happen more than once, just in case ---
163 e.g. checking if it's zero before finalizing and then setting it to 163 e.g. checking if it's zero before finalizing and then setting it to
164 zero after finalizing. */ 164 zero after finalizing. */
165 ratio_fini (num->data); 165 ratio_fini (num->data);
259 xfree (fstr); 259 xfree (fstr);
260 } 260 }
261 261
262 #ifdef NEW_GC 262 #ifdef NEW_GC
263 static void 263 static void
264 bigfloat_finalize (void *header) 264 bigfloat_finalize (Lisp_Object obj)
265 { 265 {
266 struct Lisp_Bigfloat *num = (struct Lisp_Bigfloat *) header; 266 struct Lisp_Bigfloat *num = XBIGFLOAT (obj);
267 /* #### WARNING: It would be better to put some sort of check to make 267 /* #### WARNING: It would be better to put some sort of check to make
268 sure this doesn't happen more than once, just in case --- 268 sure this doesn't happen more than once, just in case ---
269 e.g. checking if it's zero before finalizing and then setting it to 269 e.g. checking if it's zero before finalizing and then setting it to
270 zero after finalizing. */ 270 zero after finalizing. */
271 bigfloat_fini (num->bf); 271 bigfloat_fini (num->bf);