~ubuntu-branches/ubuntu/vivid/gnustep-base/vivid-proposed

« back to all changes in this revision

Viewing changes to Source/NSArray.m

  • Committer: Package Import Robot
  • Author(s): Yavor Doganov
  • Date: 2014-10-22 17:36:45 UTC
  • mfrom: (1.4.4)
  • Revision ID: package-import@ubuntu.com-20141022173645-cxzzinte030ltjoc
Tags: 1.24.7-1
* New upstream bugfix release:
  - SSLv3 is disabled by default because of CVE-2014-3566.
* debian/patches/testsuite-fixes.patch: Remove hunks applied upstream.
  Disable some tests that are doomed to fail.
* debian/patches/info-direntry.patch:
* debian/patches/manpage-fixes.patch: Remove hunks applied upstream.
* debian/patches/NSString-buffer-overrun.patch:
* debian/patches/ftbfs-mips64.patch:
* debian/patches/hide-SYSTEM_CONFIG-vars.patch:
* debian/patches/use-local-DTDs.patch:
* debian/patches/CVE-2014-2980.patch:
* debian/patches/kfreebsd-fake-main.patch:
* debian/patches/avoid-nsl-linkage.patch:
* debian/patches/gnutls28.patch:
* debian/patches/alignment-check.patch:
* debian/patches/avoid-tools-extra-linkage.patch:
* debian/patches/maxsymlinks.diff: Delete; applied upstream.
* debian/patches/pldes-manpage-rename.patch: Refresh.
* debian/patches/autoreconf.patch: Delete; no longer needed.
* debian/patches/fix-spelling-errors.patch: New.
* debian/patches/series: Update.
* debian/HTMLLinker.1:
* debian/make_strings.1: Delete; added upstream.
* debian/rules (configure-stamp): Dump config.log to stdout in case of
  configure error.
  (binary-arch): Install upstream manpages.
* debian/control.m4 (Standards-Version): Bump to 3.9.6; no changes
  needed.
* debian/control: Regenerate.
* debian/gnustep-base-common.xmlcatalogs.in: Add new 1_0_4 DTD.
* debian/gnustep-base-runtime.gdomap.in: Check for daemon existence,
  thanks Felipe Sateler (Closes: #764526).  Create /var/run/gdomap
  before the daemon starts.
* debian/gdomap.default: Avoid chroot to /tmp, thanks Ansgar Burchardt
  (Closes: #741441).
* debian/gnustep-base-runtime.NEWS: Rename as NEWS as it is not picked
  by apt-listchanges.
* debian/watch: Check upstream signature.
* debian/upstream/signing-key.pgp: Add upstream keyring.
* debian/source/include-binaries: New file.
* debian/copyright: Switch to format 1.0, update copyright years.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
   Boston, MA 02111 USA.
28
28
 
29
29
   <title>NSArray class reference</title>
30
 
   $Date: 2013-12-13 21:01:22 +0000 (Fri, 13 Dec 2013) $ $Revision: 37464 $
 
30
   $Date: 2014-01-09 09:55:36 +0000 (Thu, 09 Jan 2014) $ $Revision: 37564 $
31
31
   */
32
32
 
33
33
#import "common.h"
390
390
                                   objects: (__unsafe_unretained id[])stackbuf
391
391
                                     count: (NSUInteger)len
392
392
{
393
 
  NSUInteger size = [self count];
394
393
  NSInteger count;
395
394
 
396
 
  /* This is cached in the caller at the start and compared at each
 
395
  /* In a mutable subclass, the mutationsPtr should be set to point to a
 
396
   * value (unsigned long) which will be changed (incremented) whenever
 
397
   * the container is mutated (content added, removed, re-ordered).
 
398
   * This is cached in the caller at the start and compared at each
397
399
   * iteration.   If it changes during the iteration then
398
400
   * objc_enumerationMutation() will be called, throwing an exception.
 
401
   * The abstract base class implementation points to a fixed value
 
402
   * (the enumeration state pointer should exist and be unchanged for as
 
403
   * long as the enumeration process runs), which is fine for enumerating
 
404
   * an immutable array.
399
405
   */
400
 
  state->mutationsPtr = (unsigned long *)size;
401
 
  count = MIN(len, size - state->state);
 
406
  state->mutationsPtr = (unsigned long *)&state->mutationsPtr;
 
407
  count = MIN(len, [self count] - state->state);
402
408
  /* If a mutation has occurred then it's possible that we are being asked to
403
409
   * get objects from after the end of the array.  Don't pass negative values
404
410
   * to memcpy.