~ubuntu-branches/ubuntu/natty/ruby1.8/natty-updates

« back to all changes in this revision

Viewing changes to ext/bigdecimal/bigdecimal.c

  • Committer: Package Import Robot
  • Author(s): Daigo Moriwaki
  • Date: 2010-06-27 22:16:44 UTC
  • mfrom: (22.1.12 sid)
  • Revision ID: package-import@ubuntu.com-20100627221644-7n8891uzqc17nvyq
Tags: 1.8.7.299-1
* New upstream release
* Removed patches that the upstrem has applied:
  - debian/patches/100312_timeout-fix.dpatch
  - debian/patches/100620_fix_pathname_warning.dpatch
  - debian/patches/100620_fix_super_called_outside_of_method.dpatch

Show diffs side-by-side

added added

removed removed

Lines of Context:
2506
2506
    int  sign=1;
2507
2507
    Real *vp = NULL;
2508
2508
    U_LONG mf = VpGetPrecLimit();
2509
 
    volatile VALUE buf;
 
2509
    VALUE buf;
2510
2510
 
2511
2511
    mx = (mx + BASE_FIG - 1) / BASE_FIG + 1;    /* Determine allocation unit. */
2512
2512
    if(szVal) {
2534
2534
 
2535
2535
    /* Skip all '_' after digit: 2006-6-30 */
2536
2536
    ni = 0;
2537
 
    buf = rb_str_new(0,strlen(szVal)+1);
 
2537
    buf = rb_str_tmp_new(strlen(szVal)+1);
2538
2538
    psz = RSTRING_PTR(buf);
2539
2539
    i   = 0;
2540
2540
    ipn = 0;
2633
2633
    vp->MaxPrec = mx;        /* set max precision */
2634
2634
    VpSetZero(vp,sign);
2635
2635
    VpCtoV(vp, &(szVal[ipn]), ni, &(szVal[ipf]), nf, &(szVal[ipe]), ne);
 
2636
    rb_str_resize(buf, 0);
2636
2637
    return vp;
2637
2638
}
2638
2639