~ubuntu-branches/ubuntu/lucid/erlang/lucid-updates

« back to all changes in this revision

Viewing changes to erts/emulator/beam/erl_bits.c

  • Committer: Elliot Murphy
  • Date: 2009-12-22 02:56:21 UTC
  • mfrom: (3.3.5 sid)
  • Revision ID: elliot@elliotmurphy.com-20091222025621-qv3rja8gbpiabkbe
Tags: 1:13.b.3-dfsg-2ubuntu1
* Merge with Debian testing; remaining Ubuntu changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to. (LP #438365)
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
* Fixed dialyzer(1) manpage which was placed into section 3 and conflicted
  with dialyzer(3erl).
* New upstream release (it adds a new binary package erlang-erl-docgen).
* Refreshed patches, removed most of emacs.patch which is applied upstream.
* Linked run_test binary from erlang-common-test package to /usr/bin.
* Fixed VCS headers in debian/control.
* Moved from prebuilt manpages to generated from sources. This adds
  erlang-manpages binary package and xsltproc build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
427
427
    ErlSubBin* sb;
428
428
    size_t num_bytes;           /* Number of bytes in binary. */
429
429
 
430
 
    if (num_bits == 0) {                /* Empty binary. */
431
 
        return new_binary(p, NULL, 0);
432
 
    }
433
430
    if (mb->size - mb->offset < num_bits) {     /* Asked for too many bits.  */
434
431
        return THE_NON_VALUE;
435
432
    }
436
 
    
437
433
 
438
434
    /*
439
435
     * From now on, we can't fail.
1344
1340
        pb->val = bptr;
1345
1341
        pb->bytes = (byte*) bptr->orig_bytes;
1346
1342
        pb->flags = PB_IS_WRITABLE | PB_ACTIVE_WRITER;
1347
 
        MSO(c_p).overhead += pb->size / BINARY_OVERHEAD_FACTOR / sizeof(Eterm);
 
1343
        MSO(c_p).overhead += pb->size / sizeof(Eterm);
1348
1344
 
1349
1345
        /*
1350
1346
         * Now allocate the sub binary and set its size to include the
1515
1511
    pb->val = bptr;
1516
1512
    pb->bytes = (byte*) bptr->orig_bytes;
1517
1513
    pb->flags = PB_IS_WRITABLE | PB_ACTIVE_WRITER;
1518
 
    MSO(p).overhead += pb->size / BINARY_OVERHEAD_FACTOR / sizeof(Eterm);
 
1514
    MSO(p).overhead += pb->size / sizeof(Eterm);
1519
1515
    
1520
1516
    /*
1521
1517
     * Now allocate the sub binary.