summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>1999-10-08 20:04:44 +0000
committerrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>1999-10-08 20:04:44 +0000
commit31c684922fabfd7c4856df54f0dce3b23a5294fc (patch)
tree4b6fcb7f55f3b32b3867060cdd322a873980c359
parentdf352404dcedbf55619d7ad08a9d0c996b6bbd8e (diff)
downloadlibapr-31c684922fabfd7c4856df54f0dce3b23a5294fc.tar.gz
Bring the misc code up to the APR parameter order spec. This also fixes a few
files I missed when doing the locks argument ordering fixes. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@59294 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--acconfig.h2
-rw-r--r--file_io/unix/fileacc.c4
-rw-r--r--file_io/win32/fileacc.c4
-rw-r--r--include/apr_general.h6
-rw-r--r--include/apr_lock.h6
-rw-r--r--locks/unix/locks.c4
-rw-r--r--locks/win32/locks.c4
-rw-r--r--misc/beos/start.c7
-rw-r--r--misc/unix/start.c7
-rw-r--r--misc/win32/start.c7
-rw-r--r--network_io/beos/poll.c4
-rw-r--r--network_io/beos/sockets.c4
-rw-r--r--network_io/unix/poll.c4
-rw-r--r--network_io/unix/sockets.c4
-rw-r--r--network_io/win32/poll.c4
-rw-r--r--network_io/win32/sockets.c4
-rw-r--r--test/testcontext.c4
-rw-r--r--test/testthread.c2
-rw-r--r--threadproc/beos/procsup.c4
-rw-r--r--threadproc/unix/procsup.c4
-rw-r--r--threadproc/unix/thread.c4
-rw-r--r--threadproc/unix/threadpriv.c4
-rw-r--r--threadproc/win32/proc.c4
-rw-r--r--threadproc/win32/thread.c4
-rw-r--r--threadproc/win32/threadpriv.c4
-rw-r--r--time/unix/access.c4
-rw-r--r--time/win32/access.c4
27 files changed, 60 insertions, 57 deletions
diff --git a/acconfig.h b/acconfig.h
index bc7b16969..381f50bd9 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -70,7 +70,7 @@ Sigfunc *signal(int signo, Sigfunc * func);
#define SAFETY_LOCK(func_name, cnt, name_str) \
{ \
if (lock_##func_name == NULL) \
- if (ap_create_lock(cnt, APR_MUTEX, APR_INTRAPROCESS, name_str, &lock_##func_name) != APR_SUCCESS) \
+ if (ap_create_lock(&lock_##func_name, APR_MUTEX, APR_INTRAPROCESS, name_str, cnt) != APR_SUCCESS) \
return APR_NOTTHREADSAFE; \
if (ap_lock(lock_##func_name) != APR_SUCCESS) \
return APR_NOTTHREADSAFE; \
diff --git a/file_io/unix/fileacc.c b/file_io/unix/fileacc.c
index 321e21f35..a4b2fb95a 100644
--- a/file_io/unix/fileacc.c
+++ b/file_io/unix/fileacc.c
@@ -260,7 +260,7 @@ ap_status_t ap_get_filetype(ap_filetype_e *type, struct file_t *file)
ap_status_t ap_get_filedata(void *data, char *key, struct file_t *file)
{
if (file != NULL) {
- return ap_get_userdata(&data, file->cntxt, key);
+ return ap_get_userdata(&data, key, file->cntxt);
}
else {
data = NULL;
@@ -281,7 +281,7 @@ ap_status_t ap_set_filedata(struct file_t *file, void *data, char *key,
ap_status_t (*cleanup) (void *))
{
if (file != NULL) {
- return ap_set_userdata(file->cntxt, data, key, cleanup);
+ return ap_set_userdata(data, key, cleanup, file->cntxt);
}
else {
data = NULL;
diff --git a/file_io/win32/fileacc.c b/file_io/win32/fileacc.c
index 8a23d49de..82f741de0 100644
--- a/file_io/win32/fileacc.c
+++ b/file_io/win32/fileacc.c
@@ -183,7 +183,7 @@ ap_status_t ap_get_filetype(ap_filetype_e *type, struct file_t *file)
ap_status_t ap_get_filedata(void *data, char *key, struct file_t *file)
{
if (file != NULL) {
- return ap_get_userdata(&data, file->cntxt, key);
+ return ap_get_userdata(&data, key, file->cntxt);
}
else {
data = NULL;
@@ -195,7 +195,7 @@ ap_status_t ap_set_filedata(struct file_t *file, void *data, char *key,
ap_status_t (*cleanup) (void *))
{
if (file != NULL) {
- return ap_set_userdata(file->cntxt, data, key, cleanup);
+ return ap_set_userdata(data, key, cleanup, file->cntxt);
}
else {
data = NULL;
diff --git a/include/apr_general.h b/include/apr_general.h
index 1d1b3a783..a344f86e1 100644
--- a/include/apr_general.h
+++ b/include/apr_general.h
@@ -228,9 +228,9 @@ typedef int ap_signum_t;
ap_status_t ap_create_context(ap_context_t **, ap_context_t *);
ap_status_t ap_destroy_context(struct context_t *cont);
ap_status_t ap_exit(ap_context_t *);
-ap_status_t ap_set_userdata(ap_context_t *, void *, char *,
- ap_status_t (*cleanup) (void *));
-ap_status_t ap_get_userdata(void **, ap_context_t *, char *);
+ap_status_t ap_set_userdata(void *, char *,
+ ap_status_t (*cleanup) (void *), ap_context_t *);
+ap_status_t ap_get_userdata(void **, char *, ap_context_t *);
ap_status_t ap_initialize(void);
ap_status_t ap_create_signal(ap_context_t *, ap_signum_t);
diff --git a/include/apr_lock.h b/include/apr_lock.h
index 64a998872..d65a379b3 100644
--- a/include/apr_lock.h
+++ b/include/apr_lock.h
@@ -70,12 +70,12 @@ typedef enum {APR_MUTEX, APR_READWRITE} ap_locktype_e;
typedef struct lock_t ap_lock_t;
/* Function definitions */
-ap_status_t ap_create_lock(ap_context_t *, ap_locktype_e, ap_lockscope_e,
- char *, ap_lock_t **);
+ap_status_t ap_create_lock(ap_lock_t **, ap_locktype_e, ap_lockscope_e,
+ char *, ap_context_t *);
ap_status_t ap_lock(ap_lock_t *);
ap_status_t ap_unlock(ap_lock_t *);
ap_status_t ap_destroy_lock(ap_lock_t *);
-ap_status_t ap_child_init_lock(ap_lock_t **, ap_context_t *, char *);
+ap_status_t ap_child_init_lock(ap_lock_t **, char *, ap_context_t *);
ap_status_t ap_get_lockdata(ap_lock_t *, char *, void *);
ap_status_t ap_set_lockdata(ap_lock_t *, void *, char *,
diff --git a/locks/unix/locks.c b/locks/unix/locks.c
index 64f0adc50..c6c82909a 100644
--- a/locks/unix/locks.c
+++ b/locks/unix/locks.c
@@ -204,7 +204,7 @@ ap_status_t ap_child_init_lock(struct lock_t **lock, char *fname, ap_context_t *
ap_status_t ap_get_lockdata(struct lock_t *lock, char *key, void *data)
{
if (lock != NULL) {
- return ap_get_userdata(&data, lock->cntxt, key);
+ return ap_get_userdata(&data, key, lock->cntxt);
}
else {
data = NULL;
@@ -225,7 +225,7 @@ ap_status_t ap_set_lockdata(struct lock_t *lock, void *data, char *key,
ap_status_t (*cleanup) (void *))
{
if (lock != NULL) {
- return ap_set_userdata(lock->cntxt, data, key, cleanup);
+ return ap_set_userdata(data, key, cleanup, lock->cntxt);
}
else {
data = NULL;
diff --git a/locks/win32/locks.c b/locks/win32/locks.c
index d3991a4f2..8e8450211 100644
--- a/locks/win32/locks.c
+++ b/locks/win32/locks.c
@@ -167,7 +167,7 @@ ap_status_t ap_destroy_lock(struct lock_t *lock)
ap_status_t ap_get_lockdata(struct lock_t *lock, char *key, void *data)
{
if (lock != NULL) {
- return ap_get_userdata(&data, lock->cntxt, key);
+ return ap_get_userdata(&data, key, lock->cntxt);
}
else {
data = NULL;
@@ -179,7 +179,7 @@ ap_status_t ap_set_lockdata(struct lock_t *lock, void *data, char *key,
ap_status_t (*cleanup) (void *))
{
if (lock != NULL) {
- return ap_set_userdata(lock->cntxt, data, key, cleanup);
+ return ap_set_userdata(data, key, cleanup, lock->cntxt);
}
else {
data = NULL;
diff --git a/misc/beos/start.c b/misc/beos/start.c
index 626f72975..597cf968e 100644
--- a/misc/beos/start.c
+++ b/misc/beos/start.c
@@ -99,8 +99,9 @@ ap_status_t ap_destroy_context(ap_context_t *cont)
return APR_SUCCESS;
}
-ap_status_t ap_set_userdata(struct context_t *cont, void *data, char *key,
- ap_status_t (*cleanup) (void *))
+ap_status_t ap_set_userdata(void *data, char *key,
+ ap_status_t (*cleanup) (void *),
+ struct context_t *cont)
{
datastruct *dptr = NULL, *dptr2 = NULL;
if (cont) {
@@ -130,7 +131,7 @@ ap_status_t ap_set_userdata(struct context_t *cont, void *data, char *key,
return APR_ENOCONT;
}
-ap_status_t ap_get_userdata(void **data, struct context_t *cont, char *key)
+ap_status_t ap_get_userdata(void **data, char *key, struct context_t *cont)
{
datastruct *dptr = NULL;
if (cont) {
diff --git a/misc/unix/start.c b/misc/unix/start.c
index cf2c1e24d..16d814d00 100644
--- a/misc/unix/start.c
+++ b/misc/unix/start.c
@@ -132,8 +132,9 @@ ap_status_t ap_destroy_context(struct context_t *cont)
* 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 *))
+ap_status_t ap_set_userdata(void *data, char *key,
+ ap_status_t (*cleanup) (void *),
+ struct context_t *cont)
{
datastruct *dptr = NULL, *dptr2 = NULL;
if (cont) {
@@ -170,7 +171,7 @@ ap_status_t ap_set_userdata(struct context_t *cont, void *data, char *key,
* arg 2) The key for the data to retrieve
* arg 3) The user data associated with the context.
*/
-ap_status_t ap_get_userdata(void **data, struct context_t *cont, char *key)
+ap_status_t ap_get_userdata(void **data, char *key, struct context_t *cont)
{
datastruct *dptr = NULL;
if (cont) {
diff --git a/misc/win32/start.c b/misc/win32/start.c
index d12adc0bb..cfe754be2 100644
--- a/misc/win32/start.c
+++ b/misc/win32/start.c
@@ -146,8 +146,9 @@ ap_status_t ap_get_oslevel(ap_context_t *cont, ap_oslevel_e *level)
return APR_EEXIST;
}
-ap_status_t ap_set_userdata(struct context_t *cont, void *data, char *key,
- ap_status_t (*cleanup) (void *))
+ap_status_t ap_set_userdata(void *data, char *key,
+ ap_status_t (*cleanup) (void *),
+ struct context_t *cont)
{
datastruct *dptr = NULL, *dptr2 = NULL;
if (cont) {
@@ -177,7 +178,7 @@ ap_status_t ap_set_userdata(struct context_t *cont, void *data, char *key,
return APR_ENOCONT;
}
-ap_status_t ap_get_userdata(void **data, struct context_t *cont, char *key)
+ap_status_t ap_get_userdata(void **data, char *key, struct context_t *cont)
{
datastruct *dptr = NULL;
if (cont) {
diff --git a/network_io/beos/poll.c b/network_io/beos/poll.c
index 63522e40a..1fb54acf1 100644
--- a/network_io/beos/poll.c
+++ b/network_io/beos/poll.c
@@ -210,7 +210,7 @@ ap_status_t ap_clear_poll_sockets(struct pollfd_t *aprset, ap_int16_t event)
ap_status_t ap_get_polldata(struct pollfd_t *pollfd, char *key, void *data)
{
if (pollfd != NULL) {
- return ap_get_userdata(&data, pollfd->cntxt, key);
+ return ap_get_userdata(&data, key, pollfd->cntxt);
}
else {
data = NULL;
@@ -222,7 +222,7 @@ ap_status_t ap_set_polldata(struct pollfd_t *pollfd, void *data, char *key,
ap_status_t (*cleanup) (void *))
{
if (pollfd != NULL) {
- return ap_set_userdata(pollfd->cntxt, data, key, cleanup);
+ return ap_set_userdata(data, key, cleanup, pollfd->cntxt);
}
else {
data = NULL;
diff --git a/network_io/beos/sockets.c b/network_io/beos/sockets.c
index 23dc5ca7b..d41d40db7 100644
--- a/network_io/beos/sockets.c
+++ b/network_io/beos/sockets.c
@@ -229,7 +229,7 @@ ap_status_t ap_connect(struct socket_t *sock, char *hostname)
ap_status_t ap_get_socketdata(struct socket_t *sock, char *key, void *data)
{
if (socket != NULL) {
- return ap_get_userdata(&data, sock->cntxt, key);
+ return ap_get_userdata(&data, key, sock->cntxt);
}
else {
data = NULL;
@@ -241,7 +241,7 @@ ap_status_t ap_set_socketdata(struct socket_t *sock, void *data, char *key,
ap_status_t (*cleanup) (void *))
{
if (sock != NULL) {
- return ap_set_userdata(sock->cntxt, data, key, cleanup);
+ return ap_set_userdata(data, key, cleanup, sock->cntxt);
}
else {
data = NULL;
diff --git a/network_io/unix/poll.c b/network_io/unix/poll.c
index 4ee9006a2..a206fbaf8 100644
--- a/network_io/unix/poll.c
+++ b/network_io/unix/poll.c
@@ -436,7 +436,7 @@ ap_status_t ap_clear_poll_sockets(struct pollfd_t *aprset, ap_int16_t event)
ap_status_t ap_get_polldata(struct pollfd_t *pollfd, char *key, void *data)
{
if (pollfd != NULL) {
- return ap_get_userdata(&data, pollfd->cntxt, key);
+ return ap_get_userdata(&data, key, pollfd->cntxt);
}
else {
data = NULL;
@@ -456,7 +456,7 @@ ap_status_t ap_set_polldata(struct pollfd_t *pollfd, void *data, char *key,
ap_status_t (*cleanup) (void *))
{
if (pollfd != NULL) {
- return ap_set_userdata(pollfd->cntxt, data, key, cleanup);
+ return ap_set_userdata(data, key, cleanup, pollfd->cntxt);
}
else {
data = NULL;
diff --git a/network_io/unix/sockets.c b/network_io/unix/sockets.c
index af3170616..da0c22238 100644
--- a/network_io/unix/sockets.c
+++ b/network_io/unix/sockets.c
@@ -320,7 +320,7 @@ ap_status_t ap_connect(struct socket_t *sock, char *hostname)
ap_status_t ap_get_socketdata(struct socket_t *sock, char *key, void *data)
{
if (socket != NULL) {
- return ap_get_userdata(&data, sock->cntxt, key);
+ return ap_get_userdata(&data, key, sock->cntxt);
}
else {
data = NULL;
@@ -339,7 +339,7 @@ ap_status_t ap_set_socketdata(struct socket_t *sock, void *data, char *key,
ap_status_t (*cleanup) (void *))
{
if (sock != NULL) {
- return ap_set_userdata(sock->cntxt, data, key, cleanup);
+ return ap_set_userdata(data, key, cleanup, sock->cntxt);
}
else {
data = NULL;
diff --git a/network_io/win32/poll.c b/network_io/win32/poll.c
index 1d894f157..97e7a5a09 100644
--- a/network_io/win32/poll.c
+++ b/network_io/win32/poll.c
@@ -199,7 +199,7 @@ ap_status_t ap_get_revents(struct pollfd_t *aprset, struct socket_t *sock, ap_in
ap_status_t ap_get_polldata(struct pollfd_t *pollfd, char *key, void *data)
{
if (pollfd != NULL) {
- return ap_get_userdata(&data, pollfd->cntxt, key);
+ return ap_get_userdata(&data, key, pollfd->cntxt);
}
else {
data = NULL;
@@ -211,7 +211,7 @@ ap_status_t ap_set_polldata(struct pollfd_t *pollfd, void *data, char *key,
ap_status_t (*cleanup) (void *))
{
if (pollfd != NULL) {
- return ap_set_userdata(pollfd->cntxt, data, key, cleanup);
+ return ap_set_userdata(data, key, cleanup, pollfd->cntxt);
}
else {
data = NULL;
diff --git a/network_io/win32/sockets.c b/network_io/win32/sockets.c
index d088265ed..5e4b51b83 100644
--- a/network_io/win32/sockets.c
+++ b/network_io/win32/sockets.c
@@ -267,7 +267,7 @@ ap_status_t ap_connect(struct socket_t *sock, char *hostname)
ap_status_t ap_get_socketdata(struct socket_t *socket, char *key, void *data)
{
if (socket != NULL) {
- return ap_get_userdata(&data, socket->cntxt, key);
+ return ap_get_userdata(&data, key, socket->cntxt);
}
else {
data = NULL;
@@ -279,7 +279,7 @@ ap_status_t ap_set_socketdata(struct socket_t *socket, void *data, char *key,
ap_status_t (*cleanup) (void *))
{
if (socket != NULL) {
- return ap_set_userdata(socket->cntxt, data, key, cleanup);
+ return ap_set_userdata(data, key, cleanup, socket->cntxt);
}
else {
data = NULL;
diff --git a/test/testcontext.c b/test/testcontext.c
index c566a2448..9e6588a0c 100644
--- a/test/testcontext.c
+++ b/test/testcontext.c
@@ -79,9 +79,9 @@ int main()
testdata = ap_pstrdup(context, "This is a test\n");
- ap_set_userdata(context, testdata, "TEST", string_cleanup);
+ ap_set_userdata(testdata, "TEST", string_cleanup, context);
- ap_get_userdata((void **)&retdata, context, "TEST");
+ ap_get_userdata((void **)&retdata, "TEST", context);
if (!strcmp(testdata, retdata)) {
fprintf(stdout, "User data is working ok\n");
diff --git a/test/testthread.c b/test/testthread.c
index 829ef77af..fb7dd9fb6 100644
--- a/test/testthread.c
+++ b/test/testthread.c
@@ -136,7 +136,7 @@ int main()
fprintf(stdout, "OK\n");
fprintf(stdout, "Initializing the lock.......");
- s1 = ap_create_lock(context, APR_MUTEX, APR_INTRAPROCESS, "lock.file", &thread_lock);
+ s1 = ap_create_lock(&thread_lock, APR_MUTEX, APR_INTRAPROCESS, "lock.file", context);
if (s1 != APR_SUCCESS) {
fprintf(stderr, "Could not create lock\n");
exit(-1);
diff --git a/threadproc/beos/procsup.c b/threadproc/beos/procsup.c
index 68739d329..4ea9927ce 100644
--- a/threadproc/beos/procsup.c
+++ b/threadproc/beos/procsup.c
@@ -100,7 +100,7 @@ ap_status_t ap_detach(struct proc_t **new, ap_context_t *cont)
ap_status_t ap_get_procdata(struct proc_t *proc, char *key, void *data)
{
if (proc != NULL) {
- return ap_get_userdata(&data, proc->cntxt, key);
+ return ap_get_userdata(&data, key, proc->cntxt);
}
else {
data = NULL;
@@ -112,7 +112,7 @@ ap_status_t ap_set_procdata(struct proc_t *proc, void *data, char *key,
ap_status_t (*cleanup) (void *))
{
if (proc != NULL) {
- return ap_set_userdata(proc->cntxt, data, key, cleanup);
+ return ap_set_userdata(data, key, cleanup, proc->cntxt);
}
else {
data = NULL;
diff --git a/threadproc/unix/procsup.c b/threadproc/unix/procsup.c
index 1be490762..400d0578f 100644
--- a/threadproc/unix/procsup.c
+++ b/threadproc/unix/procsup.c
@@ -141,7 +141,7 @@ ap_status_t ap_detach(struct proc_t **new, ap_context_t *cont)
ap_status_t ap_get_procdata(struct proc_t *proc, char *key, void *data)
{
if (proc != NULL) {
- return ap_get_userdata(&data, proc->cntxt, key);
+ return ap_get_userdata(&data, key, proc->cntxt);
}
else {
data = NULL;
@@ -160,7 +160,7 @@ ap_status_t ap_set_procdata(struct proc_t *proc, void *data, char *key,
ap_status_t (*cleanup) (void *))
{
if (proc != NULL) {
- return ap_set_userdata(proc->cntxt, data, key, cleanup);
+ return ap_set_userdata(data, key, cleanup, proc->cntxt);
}
else {
data = NULL;
diff --git a/threadproc/unix/thread.c b/threadproc/unix/thread.c
index 5e32aae1c..63200eee0 100644
--- a/threadproc/unix/thread.c
+++ b/threadproc/unix/thread.c
@@ -227,7 +227,7 @@ ap_status_t ap_thread_detach(struct thread_t *thd)
ap_status_t ap_get_threaddata(struct thread_t *thread, char *key, void *data)
{
if (thread != NULL) {
- return ap_get_userdata(&data, thread->cntxt, key);
+ return ap_get_userdata(&data, key, thread->cntxt);
}
else {
data = NULL;
@@ -246,7 +246,7 @@ ap_status_t ap_set_threaddata(struct thread_t *thread, void *data, char *key,
ap_status_t (*cleanup) (void *))
{
if (thread != NULL) {
- return ap_set_userdata(thread->cntxt, data, key, cleanup);
+ return ap_set_userdata(data, key, cleanup, thread->cntxt);
}
else {
data = NULL;
diff --git a/threadproc/unix/threadpriv.c b/threadproc/unix/threadpriv.c
index 6e7e97f3e..3134ad313 100644
--- a/threadproc/unix/threadpriv.c
+++ b/threadproc/unix/threadpriv.c
@@ -139,7 +139,7 @@ ap_status_t ap_delete_thread_private(struct threadkey_t *key)
ap_status_t ap_get_threadkeydata(struct threadkey_t *threadkey, char *key, void *data)
{
if (threadkey != NULL) {
- return ap_get_userdata(&data, threadkey->cntxt, key);
+ return ap_get_userdata(&data, key, threadkey->cntxt);
}
else {
data = NULL;
@@ -158,7 +158,7 @@ ap_status_t ap_set_threadkeydata(struct threadkey_t *threadkey, void *data,
char *key, ap_status_t (*cleanup) (void *))
{
if (threadkey != NULL) {
- return ap_set_userdata(threadkey->cntxt, data, key, cleanup);
+ return ap_set_userdata(data, key, cleanup, threadkey->cntxt);
}
else {
data = NULL;
diff --git a/threadproc/win32/proc.c b/threadproc/win32/proc.c
index b8e5adf91..e7ec93753 100644
--- a/threadproc/win32/proc.c
+++ b/threadproc/win32/proc.c
@@ -341,7 +341,7 @@ ap_status_t ap_wait_proc(struct proc_t *proc,
ap_status_t ap_get_procdata(struct proc_t *proc, char *key, void *data)
{
if (proc != NULL) {
- return ap_get_userdata(&data, proc->cntxt, key);
+ return ap_get_userdata(&data, key, proc->cntxt);
}
else {
data = NULL;
@@ -353,7 +353,7 @@ ap_status_t ap_set_procdata(struct proc_t *proc, void *data, char *key,
ap_status_t (*cleanup) (void *))
{
if (proc != NULL) {
- return ap_set_userdata(proc->cntxt, data, key, cleanup);
+ return ap_set_userdata(data, key, cleanup, proc->cntxt);
}
else {
data = NULL;
diff --git a/threadproc/win32/thread.c b/threadproc/win32/thread.c
index 6ec3ae24f..728d8fc7a 100644
--- a/threadproc/win32/thread.c
+++ b/threadproc/win32/thread.c
@@ -159,7 +159,7 @@ ap_status_t ap_thread_detach(struct thread_t *thd)
ap_status_t ap_get_threaddata(struct thread_t *thread, char *key, void *data)
{
if (thread != NULL) {
- return ap_get_userdata(&data, thread->cntxt, key);
+ return ap_get_userdata(&data, key, thread->cntxt);
}
else {
data = NULL;
@@ -171,7 +171,7 @@ ap_status_t ap_set_threaddata(struct thread_t *thread, void *data, char *key,
ap_status_t (*cleanup) (void *))
{
if (thread != NULL) {
- return ap_set_userdata(thread->cntxt, data, key, cleanup);
+ return ap_set_userdata(data, key, cleanup, thread->cntxt);
}
else {
data = NULL;
diff --git a/threadproc/win32/threadpriv.c b/threadproc/win32/threadpriv.c
index a4b5a7711..aa5f06b7e 100644
--- a/threadproc/win32/threadpriv.c
+++ b/threadproc/win32/threadpriv.c
@@ -94,7 +94,7 @@ ap_status_t ap_delete_thread_private(struct threadkey_t *key)
ap_status_t ap_get_threadkeydata(struct threadkey_t *threadkey, char *key, void *data)
{
if (threadkey != NULL) {
- return ap_get_userdata(&data, threadkey->cntxt, key);
+ return ap_get_userdata(&data, key, threadkey->cntxt);
}
else {
data = NULL;
@@ -106,7 +106,7 @@ ap_status_t ap_set_threadkeydata(struct threadkey_t *threadkey, void *data,
char *key, ap_status_t (*cleanup) (void *))
{
if (threadkey != NULL) {
- return ap_set_userdata(threadkey->cntxt, data, key, cleanup);
+ return ap_set_userdata(data, key, cleanup, threadkey->cntxt);
}
else {
data = NULL;
diff --git a/time/unix/access.c b/time/unix/access.c
index 6a627ce0a..f2befee75 100644
--- a/time/unix/access.c
+++ b/time/unix/access.c
@@ -343,7 +343,7 @@ ap_status_t ap_set_wday(struct atime_t *atime, ap_int32_t value)
ap_status_t ap_get_timedata(struct atime_t *atime, char *key, void *data)
{
if (atime != NULL) {
- return ap_get_userdata(&data, atime->cntxt, key);
+ return ap_get_userdata(&data, key, atime->cntxt);
}
else {
data = NULL;
@@ -362,7 +362,7 @@ ap_status_t ap_set_timedata(struct atime_t *atime, void *data, char *key,
ap_status_t (*cleanup) (void *))
{
if (atime != NULL) {
- return ap_set_userdata(atime->cntxt, data, key, cleanup);
+ return ap_set_userdata(data, key, cleanup, atime->cntxt);
}
else {
data = NULL;
diff --git a/time/win32/access.c b/time/win32/access.c
index d36ada6a7..1f24594ce 100644
--- a/time/win32/access.c
+++ b/time/win32/access.c
@@ -245,7 +245,7 @@ ap_status_t ap_set_wday(struct atime_t *time, ap_int32_t value)
ap_status_t ap_get_timedata(struct atime_t *atime, char *key, void *data)
{
if (atime != NULL) {
- return ap_get_userdata(&data, atime->cntxt, key);
+ return ap_get_userdata(&data, key, atime->cntxt);
}
else {
data = NULL;
@@ -257,7 +257,7 @@ ap_status_t ap_set_timedata(struct atime_t *atime, void *data, char *key,
ap_status_t (*cleanup) (void *))
{
if (atime != NULL) {
- return ap_set_userdata(atime->cntxt, data, key, cleanup);
+ return ap_set_userdata(data, key, cleanup, atime->cntxt);
}
else {
data = NULL;