apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46205] New: Extend apr_array with a function to shuffle members
Date Thu, 13 Nov 2008 22:32:27 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46205

           Summary: Extend apr_array with a function to shuffle members
           Product: APR
           Version: HEAD
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: jacob.rief@gmail.com


Created an attachment (id=22862)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22862)
Just a file with a short function

Since I had the need for a function, which shuffles members of an apr_array_t,
I have written one which conforms to the style of apr and which could be added
to a future version of the library. The prototype of this functions looks like:

/**
 * Shuffle the content of an array.
 * @param p The pool to allocate the copy of the array out of.
 * @param sorted The sorted array.
 * @return An array of the same size with its elements shuffled randomly.
 **/
extern APR_DECLARE(apr_array_header_t *)
apr_array_shuffle_ext(apr_pool_t * p,  const apr_array_header_t * sorted);


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message