diff options
author | rbb <rbb@13f79535-47bb-0310-9956-ffa450edef68> | 1999-10-04 16:37:48 +0000 |
---|---|---|
committer | rbb <rbb@13f79535-47bb-0310-9956-ffa450edef68> | 1999-10-04 16:37:48 +0000 |
commit | 636a5b651386b67ebf0319d23ffb6a644733c3a6 (patch) | |
tree | cc3bddffac57af165a495dc1e60091d9635ba19e /shmem | |
parent | 8b551a56788f93740c5afc5b52ef7ef4bdc28c43 (diff) | |
download | libapr-636a5b651386b67ebf0319d23ffb6a644733c3a6.tar.gz |
First patch to re-order function parameters. This one gets the low hanging
fruit, and moves most of the result parameters to the first argument.
Future patches in this series will move the rest of the result parameters
to the beginning of the list, and will move the context's to the end of the
list
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@59259 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'shmem')
-rw-r--r-- | shmem/shmem.c | 10 | ||||
-rw-r--r-- | shmem/unix/shmem.c | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/shmem/shmem.c b/shmem/shmem.c index 735256e7c..41f56b84c 100644 --- a/shmem/shmem.c +++ b/shmem/shmem.c @@ -58,7 +58,7 @@ struct shmem_t { ap_context_t *cntxt; } -ap_status_t ap_shm_create(ap_context_t *cont, ap_size_t size, const char *file, struct shmem_t **new) +ap_status_t ap_shm_create(struct shmem_t **new, ap_context_t *cont, ap_size_t size, const char *file) { MM *mm = mm_create(size, file); @@ -81,7 +81,7 @@ ap_status_t ap_shm_destroy(struct shmem_t *shared) return APR_SUCCESS; } -ap_status_t ap_shm_malloc(struct shmem_t *shared, ap_size_t size, void **entity) +ap_status_t ap_shm_malloc(void **entity, struct shmem_t *shared, ap_size_t size) { entity = mm_malloc(shared->mm, size); if (entity == NULL) { @@ -90,7 +90,7 @@ ap_status_t ap_shm_malloc(struct shmem_t *shared, ap_size_t size, void **entity) return APR_SUCCESS; } -ap_status_t ap_shm_calloc(struct shmem_t *shared, ap_size_t size, void **entity) +ap_status_t ap_shm_calloc(void **entity, struct shmem_t *shared, ap_size_t size) { entity = mm_calloc(shared->mm, size); if (entity == NULL) { @@ -99,7 +99,7 @@ ap_status_t ap_shm_calloc(struct shmem_t *shared, ap_size_t size, void **entity) return APR_SUCCESS; } -ap_status_t ap_shm_realloc(struct shmem_t *shared, ap_size_t size, void **entity) +ap_status_t ap_shm_realloc(void **entity, struct shmem_t *shared, ap_size_t size) { void *new; @@ -118,7 +118,7 @@ ap_status_t ap_shm_free(struct shmem_t *shared, void *entity) return APR_SUCCESS; } -ap_status_t ap_shm_strdup(struct shmem_t *shared, const char *old, char **new) +ap_status_t ap_shm_strdup(char **new, struct shmem_t *shared, const char *old) { (*new) = mm_strdup(shared->mm, old); if ((*new) == NULL) { diff --git a/shmem/unix/shmem.c b/shmem/unix/shmem.c index 848e4fece..1263c0cee 100644 --- a/shmem/unix/shmem.c +++ b/shmem/unix/shmem.c @@ -86,7 +86,7 @@ ap_status_t ap_shm_destroy(struct shmem_t *shared) return APR_SUCCESS; } -ap_status_t ap_shm_malloc(struct shmem_t *shared, ap_size_t size, void **entity) +ap_status_t ap_shm_malloc(void **entity, struct shmem_t *shared, ap_size_t size) { entity = mm_malloc(shared->mm, size); if (entity == NULL) { @@ -105,7 +105,7 @@ ap_status_t ap_shm_calloc(struct shmem_t *shared, ap_size_t num, return APR_SUCCESS; } -ap_status_t ap_shm_realloc(struct shmem_t *shared, ap_size_t size, void **entity) +ap_status_t ap_shm_realloc(void **entity, struct shmem_t *shared, ap_size_t size) { void *new; @@ -124,7 +124,7 @@ ap_status_t ap_shm_free(struct shmem_t *shared, void *entity) return APR_SUCCESS; } -ap_status_t ap_shm_strdup(struct shmem_t *shared, const char *old, char **new) +ap_status_t ap_shm_strdup(char **new, struct shmem_t *shared, const char *old) { (*new) = mm_strdup(shared->mm, old); if ((*new) == NULL) { |