You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Sander Striker <st...@apache.org> on 2001/09/28 14:03:48 UTC

Removing SMS

Hi,

I am in the process of removing SMS in my tree.
Are these macros used anywhere?

#define APR_CLEANUP_REGISTER(struct, data, func, scope) \
    if (struct->pool) { \
        apr_pool_cleanup_register(struct->pool, data, func, scope); \
    } else { \
        apr_sms_cleanup_register(struct->mem_sys, APR_CHILD_CLEANUP, \
                                 data, func); \
    }

#define APR_CLEANUP_REMOVE(struct, data, func) \
    if (struct->pool) { \
        apr_pool_cleanup_kill(struct->pool, data, func); \
    } else { \
        apr_sms_cleanup_unregister(struct->mem_sys, APR_CHILD_CLEANUP, \
                                   data, func); \
    }

#define APR_MEM_PSTRDUP(struct, ptr, str) \
    if (struct->pool) { \
        ptr = apr_pstrdup(struct->pool, str); \
    } else { \
        size_t len = strlen(str) + 1; \
        ptr = (char*) apr_sms_calloc(struct->mem_sys, len); \
        memcpy(ptr, str, len); \
    }

#define APR_MEM_MALLOC(ptr, struct, type) \
    if (struct->pool) { \
        ptr = (type *)apr_palloc(struct->pool, sizeof(type)); \
    } else { \
        ptr = (type *)apr_sms_malloc(struct->mem_sys, sizeof(type)); \
    }

#define APR_MEM_CALLOC(ptr, struct, type) \
    if (struct->pool) { \
        ptr = (type *)apr_pcalloc(struct->pool, sizeof(type)); \
    } else { \
        ptr = (type *)apr_sms_calloc(struct->mem_sys, sizeof(type)); \

They are in include/arch/(netware|win32)/private.h.

I know they aren't used in apr and apr-util, and as far as I can
tell not in httpd-2.0, so I think I can remove those safely.

If people can give me a go ahead on my remove SMS commit I would
appreciate it.

Sander


Re: Removing SMS

Posted by Ryan Bloom <rb...@covalent.net>.
On Friday 28 September 2001 06:39 am, Sander Striker wrote:
> > From: Sander Striker [mailto:striker@apache.org]
> > Sent: 28 September 2001 14:04
> >
> > Hi,
> >
> > I am in the process of removing SMS in my tree.
> > Are these macros used anywhere?
> >
> > #define APR_CLEANUP_REGISTER(struct, data, func, scope) \
> > #define APR_CLEANUP_REMOVE(struct, data, func) \
> > #define APR_MEM_PSTRDUP(struct, ptr, str) \
> > #define APR_MEM_MALLOC(ptr, struct, type) \
> > #define APR_MEM_CALLOC(ptr, struct, type) \
> >
> > They are in include/arch/(netware|win32)/private.h.
> >
> > I know they aren't used in apr and apr-util, and as far as I can
> > tell not in httpd-2.0, so I think I can remove those safely.
>
> Didn't find any references in apr, apr-util or httpd, so I'm
> removing them.
>
> > If people can give me a go ahead on my remove SMS commit I would
> > appreciate it.
>
> Never mind I found Cliffs commit msg of the sms dependency removal
> for the buckets...
>
> Ah, my build of httpd just failed.
>
> If someone could be so kind to commit this patch to httpd:
>
> --- include/http_protocol.h     Fri Sep 28 15:35:20 2001
> +++ include/http_protocol.h~    Fri Sep 28 15:23:58 2001
> @@ -602,8 +602,6 @@
>      int status;
>      /** The error string */
>      const char    *data;
> -    /** The SMS from which this structure was allocated */
> -    apr_sms_t *sms;
>  };
>
>  AP_DECLARE_DATA extern const apr_bucket_type_t ap_bucket_type_error;
>
>
> I will commit shortly after that.
>
> Sander


Committed.

Ryan
-- 

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

RE: Removing SMS

Posted by Cliff Woolley <cl...@yahoo.com>.
On Fri, 28 Sep 2001, Sander Striker wrote:

> If someone could be so kind to commit this patch to httpd:
>
> --- include/http_protocol.h     Fri Sep 28 15:35:20 2001
> +++ include/http_protocol.h~    Fri Sep 28 15:23:58 2001
> @@ -602,8 +602,6 @@
>      int status;
>      /** The error string */
>      const char    *data;
> -    /** The SMS from which this structure was allocated */
> -    apr_sms_t *sms;
>  };
>
>  AP_DECLARE_DATA extern const apr_bucket_type_t ap_bucket_type_error;

DOH!!  I'll go fix that right now. ... Oops, I see Ryan just beat me to
it.  Thanks!

--Cliff


--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA




RE: Removing SMS

Posted by Sander Striker <st...@apache.org>.
> From: Sander Striker [mailto:striker@apache.org]
> Sent: 28 September 2001 14:04

> Hi,
> 
> I am in the process of removing SMS in my tree.
> Are these macros used anywhere?
> 
> #define APR_CLEANUP_REGISTER(struct, data, func, scope) \
> #define APR_CLEANUP_REMOVE(struct, data, func) \
> #define APR_MEM_PSTRDUP(struct, ptr, str) \
> #define APR_MEM_MALLOC(ptr, struct, type) \
> #define APR_MEM_CALLOC(ptr, struct, type) \
> 
> They are in include/arch/(netware|win32)/private.h.
> 
> I know they aren't used in apr and apr-util, and as far as I can
> tell not in httpd-2.0, so I think I can remove those safely.

Didn't find any references in apr, apr-util or httpd, so I'm
removing them.

> If people can give me a go ahead on my remove SMS commit I would
> appreciate it.

Never mind I found Cliffs commit msg of the sms dependency removal
for the buckets...

Ah, my build of httpd just failed.

If someone could be so kind to commit this patch to httpd:

--- include/http_protocol.h     Fri Sep 28 15:35:20 2001
+++ include/http_protocol.h~    Fri Sep 28 15:23:58 2001
@@ -602,8 +602,6 @@
     int status;
     /** The error string */
     const char    *data;
-    /** The SMS from which this structure was allocated */
-    apr_sms_t *sms;
 };

 AP_DECLARE_DATA extern const apr_bucket_type_t ap_bucket_type_error;


I will commit shortly after that.

Sander