rbb 99/09/20 14:34:28
Modified: src/lib/apr/file_io/unix fileacc.c
src/lib/apr/misc/unix start.c
src/lib/apr/network_io/unix poll.c
Log:
Some docs changes.
Revision Changes Path
1.4 +4 -1 apache-2.0/src/lib/apr/file_io/unix/fileacc.c
Index: fileacc.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/fileacc.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- fileacc.c 1999/09/14 13:37:20 1.3
+++ fileacc.c 1999/09/20 21:34:20 1.4
@@ -252,7 +252,8 @@
* ap_status_t ap_get_filedata(ap_file_t *, char *key, void *)
* Return the data associated with the current file.
* arg 1) The currently open file.
- * arg 2) The user data associated with the file.
+ * arg 2) The key to use for retreiving data associated with this file.
+ * arg 3) The user data associated with the file.
*/
ap_status_t ap_get_filedata(struct file_t *file, char *key, void *data)
{
@@ -271,6 +272,8 @@
* Set the data associated with the current file.
* arg 1) The currently open file.
* arg 2) The user data to associate with the file.
+ * arg 3) The key to use for assocaiteing data with the file.
+ * arg 4) The cleanup routine to use when the file is destroyed.
*/
ap_status_t ap_set_filedata(struct file_t *file, void *data, char *key,
ap_status_t (*cleanup) (void *))
1.7 +12 -6 apache-2.0/src/lib/apr/misc/unix/start.c
Index: start.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/unix/start.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- start.c 1999/09/14 13:37:23 1.6
+++ start.c 1999/09/20 21:34:23 1.7
@@ -66,16 +66,13 @@
#endif
/* ***APRDOC********************************************************
- * ap_status_t ap_create_context(ap_context_t *, void *, ap_context_t **)
+ * ap_status_t ap_create_context(ap_context_t *, ap_context_t **)
* Create a new context.
* arg 1) The parent context. If this is NULL, the new context is a root
* context. If it is non-NULL, the new context will inherit all
* of it's parent context's attributes, except the ap_context_t will be a
* sub-pool.
- * arg 2) Any data to be assocaited with the context. If this is a
- * sub-context, and this value is NULL, the new context will
- * inherit the data from it's parent.
- * arg 3) The context we have just created.
+ * arg 2) The context we have just created.
*/
ap_status_t ap_create_context(struct context_t *cont, struct context_t **newcont)
{
@@ -119,12 +116,21 @@
}
/* ***APRDOC********************************************************
- * ap_status_t ap_set_userdata(ap_context_t *, void *)
+ * ap_status_t ap_set_userdata(ap_context_t *, void *, char *,
+ ap_status_t (*cleanup) (void *))
* Set the data associated with the current context.
* arg 1) The current context.
* arg 2) The user data associated with the context.
* arg 3) The key to use for association
* arg 4) The cleanup program to use to cleanup the data;
+ * NOTE: The data to be attached to the context should have the same
+ * life span as the context it is being attached to.
+ *
+ * Users of APR must take EXTREME care when choosing a key to
+ * use for their data. It is possible to accidentally overwrite
+ * data by choosing a key that another part of the program is using
+ * It is advised that steps are taken to ensure that a unique
+ * key is used at all times.
*/
ap_status_t ap_set_userdata(struct context_t *cont, void *data, char *key,
ap_status_t (*cleanup) (void *))
1.5 +3 -1 apache-2.0/src/lib/apr/network_io/unix/poll.c
Index: poll.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/unix/poll.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- poll.c 1999/09/14 13:37:24 1.4
+++ poll.c 1999/09/20 21:34:27 1.5
@@ -432,7 +432,8 @@
* ap_status_t ap_get_polldata(ap_pollfd_t *, char *, void *)
* Return the context associated with the current poll.
* arg 1) The currently open pollfd.
- * arg 2) The user data associated with the pollfd.
+ * arg 2) The key to use for retreiving data associated with a poll struct.
+ * arg 3) The user data associated with the pollfd.
*/
ap_status_t ap_get_polldata(struct pollfd_t *pollfd, char *key, void *data)
{
@@ -451,6 +452,7 @@
* Return the context associated with the current poll.
* arg 1) The currently open pollfd.
* arg 2) The user data to associate with the pollfd.
+
*/
ap_status_t ap_set_polldata(struct pollfd_t *pollfd, void *data, char *key,
ap_status_t (*cleanup) (void *))
|