<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!&nbsp; Thanks for the
clarification. &nbsp;If I find any ambiguous uses of apr_ vs. switch_ I&#8217;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>&nbsp;</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>&nbsp;</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.&nbsp; Modules can not use the apr_ namespace.&nbsp; 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.&nbsp; 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.&nbsp; The reasons for
this are, more or less as stated.&nbsp; 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> &lt;<a
href="mailto:mcollins@fcnetwork.com">mcollins@fcnetwork.com</a>&gt; 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'>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
&gt; I cannot think of a good reason, maybe others can -- but, <br>
<br>
I can't either.&nbsp;&nbsp;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>
&gt; If you find occurrences of non-conformance, patches are welcome! <br>
<br>
Sounds good.&nbsp;&nbsp;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>
&gt;<br>
&gt; m<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Thu, 8 Nov 2007, <st1:PersonName w:st="on">Michael Collins</st1:PersonName>
wrote:<br>
&gt;<br>
&gt; &gt; Guys,<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; bkw gave me some homework and now I have a few
questions.&nbsp;&nbsp;I notice<br>
that<br>
&gt; &gt; in switch-types.h there are all sorts of typedef struct statements<br>
that<br>
&gt; &gt; create a switch_ version of the corresponding apr_
type.&nbsp;&nbsp;However,<br>
I've<br>
&gt; &gt; also noticed that scattered throughout the source that there are <br>
&gt; &gt; numerous occasions where the apr_ namespace is used even when there<br>
is a<br>
&gt; &gt; switch_ equivalent available.&nbsp;&nbsp;Example: using apr_pool_t
instead of<br>
&gt; &gt; switch_memory_pool_t in mod_openmrcp.c. <br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Questions:&nbsp;&nbsp;Is it FS standard policy/best practices always
to use<br>
the<br>
&gt; &gt; switch_ namespace?&nbsp;&nbsp;Are there legitimate situations where
one would<br>
&gt; &gt; prefer apr_ instead of switch_? <br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Thanks,<br>
&gt; &gt;<br>
&gt; &gt; MC<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; P.S. - If there are cases where apr_ is used when there are switch_<br>
&gt; &gt; equivalents, does that mean there is an impending codebase cleanup <br>
&gt; &gt; project to make everything consistent?<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Freeswitch-dev mailing list<br>
&gt; <a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
&gt; UNSUBSCRIBE:<a
href="http://lists.freeswitch.org/mailman/options/freeswitch-dev">
http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
&gt; <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>&nbsp;</o:p></span></font></p>

</div>

</div>

</body>

</html>