<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Sounds good! Thanks for the
clarification. If I find any ambiguous uses of apr_ vs. switch_ I’ll ask
about them.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>-MC<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
freeswitch-dev-bounces@lists.freeswitch.org
[mailto:freeswitch-dev-bounces@lists.freeswitch.org] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Michael Jerris<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, November 09, 2007
2:10 AM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">freeswitch-dev@lists.freeswitch.org</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Freeswitch-dev] apr_
vs. switch_ namespace questions</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>The general rule is, that
the apr_ namespace is unavailable, except to a select few files in the
core. Modules can not use the apr_ namespace. The one exception to
this is mod_openmrcp, where it gets access to the apr_namespace via the
openmrcp libraries, as apr is used natively in that library. Further, in
the core, we should only be using the apr_ namespace for those functions that
we have chosen not to wrap and expose out of the core. The reasons for
this are, more or less as stated. We have already had several occasions
where we have used the wrapper functions to correct bugs in apr, or to modify
the behavior of functions, as we recently did with some of the socket code. <br>
<br>
Mike<o:p></o:p></span></font></p>
<div>
<p class=MsoNormal><span class=gmailquote><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>On 11/9/07, <st1:PersonName w:st="on"><b><span
style='font-weight:bold'>Michael Collins</span></b></st1:PersonName> <<a
href="mailto:mcollins@fcnetwork.com">mcollins@fcnetwork.com</a>> wrote:</span></font></span><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>> Best policy is to use switch_
and not use the lazy apr_.<br>
<br>
I tend to agree, at least from the standpoint of a non-coder who wants<br>
(or needs) to read the source code.<br>
<br>
> I cannot think of a good reason, maybe others can -- but, <br>
<br>
I can't either. To preserve modularity, and to make it easier to<br>
migrate away from apr if that need should arise, a clean and consistent<br>
namespace seems appropriate.<br>
<br>
> If you find occurrences of non-conformance, patches are welcome! <br>
<br>
Sounds good. I'm studying up on apr (and thusly switch_xxx) and
if/when<br>
I'm comfortable submitting patches I will most definitely do so.<br>
<br>
-MC<br>
<br>
<br>
><br>
> m<br>
><br>
><br>
><br>
> On Thu, 8 Nov 2007, <st1:PersonName w:st="on">Michael Collins</st1:PersonName>
wrote:<br>
><br>
> > Guys,<br>
> ><br>
> ><br>
> ><br>
> > bkw gave me some homework and now I have a few
questions. I notice<br>
that<br>
> > in switch-types.h there are all sorts of typedef struct statements<br>
that<br>
> > create a switch_ version of the corresponding apr_
type. However,<br>
I've<br>
> > also noticed that scattered throughout the source that there are <br>
> > numerous occasions where the apr_ namespace is used even when there<br>
is a<br>
> > switch_ equivalent available. Example: using apr_pool_t
instead of<br>
> > switch_memory_pool_t in mod_openmrcp.c. <br>
> ><br>
> ><br>
> ><br>
> > Questions: Is it FS standard policy/best practices always
to use<br>
the<br>
> > switch_ namespace? Are there legitimate situations where
one would<br>
> > prefer apr_ instead of switch_? <br>
> ><br>
> ><br>
> ><br>
> > Thanks,<br>
> ><br>
> > MC<br>
> ><br>
> ><br>
> ><br>
> > P.S. - If there are cases where apr_ is used when there are switch_<br>
> > equivalents, does that mean there is an impending codebase cleanup <br>
> > project to make everything consistent?<br>
> ><br>
> ><br>
><br>
> _______________________________________________<br>
> Freeswitch-dev mailing list<br>
> <a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
> UNSUBSCRIBE:<a
href="http://lists.freeswitch.org/mailman/options/freeswitch-dev">
http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
> <a href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
<br>
_______________________________________________<br>
Freeswitch-dev mailing list <br>
<a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org">http://www.freeswitch.org</a><o:p></o:p></span></font></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</div>
</body>
</html>