[Python-checkins] r59019 - sandbox/trunk/decimal-c/_decimal.c

mateusz.rukowicz python-checkins at python.org
Fri Nov 16 14:20:20 CET 2007


Author: mateusz.rukowicz
Date: Fri Nov 16 14:20:19 2007
New Revision: 59019

Modified:
   sandbox/trunk/decimal-c/_decimal.c
Log:
Minor update to make implementation ansi compatible.


Modified: sandbox/trunk/decimal-c/_decimal.c
==============================================================================
--- sandbox/trunk/decimal-c/_decimal.c	(original)
+++ sandbox/trunk/decimal-c/_decimal.c	Fri Nov 16 14:20:19 2007
@@ -2210,6 +2210,7 @@
 
 static decimalobject *
 _decimal_fix_nan(decimalobject *self, contextobject *ctx) {
+    decimalobject *ans;
     long max_diagnostic_len = ctx->prec - ctx->clamp;
     long limbs = (max_diagnostic_len + LOG - 1) / LOG;
     int i;
@@ -2219,7 +2220,7 @@
     }
     /* we need to copy first ceil(self->ob_size / LOG) limbs, and set size
      * because we truncate most significant limbs */
-    decimalobject *ans = _new_decimalobj(self->ob_type, max_diagnostic_len, self->sign, self->exp);
+    ans = _new_decimalobj(self->ob_type, max_diagnostic_len, self->sign, self->exp);
     if(!ans)
         return NULL;
     for(i = 0; i < limbs; i ++) {


More information about the Python-checkins mailing list