<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v = 
"urn:schemas-microsoft-com:vml" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word" xmlns:m = 
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3199" name=GENERATOR>
<STYLE>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Lucida Console";
        panose-1:2 11 6 9 4 5 4 2 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:9.0pt;
        font-family:Consolas;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
span.EmailStyle19
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</STYLE>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-AU vLink=purple link=blue>
<DIV><SPAN class=812595301-19112007><FONT face=Arial 
size=2>Robert</FONT></SPAN></DIV>
<DIV><SPAN class=812595301-19112007><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=812595301-19112007><FONT face=Arial size=2>Can you explain 
exactly in simple english</FONT></SPAN></DIV>
<DIV><SPAN class=812595301-19112007><FONT face=Arial size=2>1. What you have 
changed. I assume it's changing every BOOL to PBOOLEAN in 
ptlib?</FONT></SPAN></DIV>
<DIV><SPAN class=812595301-19112007><FONT face=Arial size=2>2. So everyone in 
every program derived from ptlib/pwlib has to change their program or when they 
compile against upcoming releases of ptlib their program will no longer function 
properly. Is that correct?</FONT></SPAN></DIV>
<DIV><SPAN class=812595301-19112007><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=812595301-19112007><FONT face=Arial size=2>For what 
benefit?  Compile time checks?  moving from BOOL to ANSI bool?  
Though I have always wondered why BOOL was used in place of bool and 
globally replacing in h323plus is fairly easy however for the 
community as a whole who have developed complex applications from these 
libraries it's going to be extremely painful as backward compatibility is broken 
and worse with C++ virtual they will not even notice it has 
even occurred until they run the program. Not a very good situation at 
all.</FONT></SPAN></DIV>
<DIV><SPAN class=812595301-19112007><FONT face=Arial size=2></FONT></SPAN><SPAN 
class=812595301-19112007><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=812595301-19112007><FONT face=Arial size=2>For this reason 
I STRONGLY STRONGLY recommend you don't make this change. IMHO it is 
something inherent with pwlib/ptlib and far too painful this late in the game 
(after 10+ years?) for minimal benefit for everyone 
involved.</FONT></SPAN></DIV>
<DIV><SPAN class=812595301-19112007><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=812595301-19112007><FONT face=Arial size=2>But of course, it 
already has been decided and the community have a week to agree 
and then it's done. This is what is truely unfortunate.</FONT></SPAN></DIV>
<DIV><SPAN class=812595301-19112007><FONT face=Arial size=2></FONT></SPAN><SPAN 
class=812595301-19112007><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=812595301-19112007><FONT face=Arial 
size=2>Simon</FONT></SPAN></DIV>
<DIV><SPAN class=812595301-19112007></SPAN><FONT face=Tahoma><FONT size=2><SPAN 
class=812595301-19112007><FONT face=Arial 
color=#0000ff> </FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Tahoma><FONT size=2><SPAN 
class=812595301-19112007></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Tahoma><FONT size=2><SPAN 
class=812595301-19112007> </SPAN>-----Original Message-----<BR><B>From:</B> 
h323plus-bounces@lists.packetizer.com 
[mailto:h323plus-bounces@lists.packetizer.com]<B>On Behalf Of </B>Robert 
Jongbloed<BR><B>Sent:</B> Monday, November 19, 2007 9:31 AM<BR><B>To:</B> 
Opalvoip-devel@lists.sourceforge.net; 
h323plus@lists.packetizer.com<BR><B>Subject:</B> [h323plus] Introducing PBoolean 
- API change alert!!!<BR><BR></DIV></FONT></FONT>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=Section1>
  <P class=MsoNormal>If  you have written any programs based on 
  PTLib/OpenH323/H323plus/OPAL, please read this, IT’S 
IMPORTANT!!<o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal>Adam Butcher from Selex Communications submitted patches a 
  while ago to change BOOL to PBoolean. The reason was so that PBoolean could be 
  defined as the ANSI standard bool type and we get a whole pile of beneficial 
  compile time checks. The process found a couple of places where a function had 
  a BOOL return type but integer (tri-state) values were being 
  returned!<o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal>Well, Craig and I had thought of this for a while as being 
  a “good thing” to do, but lack of time has always been an issue. Now, as we 
  have been presented with all the hack work, it seems that this is it’s 
  time.<o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal>Of course things are NEVER easy. The change has a nasty API 
  issue that can silently stop user programs from working. It revolves around my 
  #1 pet hate in C++, if you change the signature of a virtual function, 
  overrides silently no longer override the virtual. For example:<o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoPlainText>   //------ in the library<o:p></o:p></P>
  <P class=MsoPlainText>   class OpalXXX<o:p></o:p></P>
  <P class=MsoPlainText>   {<o:p></o:p></P>
  <P class=MsoPlainText>        virtual void 
  SomeFunction( PBoolean );<o:p></o:p></P>
  <P class=MsoPlainText>   };<o:p></o:p></P>
  <P class=MsoPlainText><o:p> </o:p></P>
  <P class=MsoPlainText>   //------- in some unchanged dependent code 
  in another application<o:p></o:p></P>
  <P class=MsoPlainText>   class MyXXX : public OpalXXX<o:p></o:p></P>
  <P class=MsoPlainText>   {<o:p></o:p></P>
  <P class=MsoPlainText>         virtual 
  void SomeFunction( BOOL );<o:p></o:p></P>
  <P class=MsoPlainText>   };<o:p></o:p></P>
  <P class=MsoPlainText><o:p> </o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal>The function MyXXX::SomeFunction() will not be called as it 
  should be. And the stupid compiler (NONE of the compilers) give any warnings 
  or indication there is an issue. Way back in the preliminary versions of C++ 
  they did have a keyword “override” which would do exactly what we want, error 
  if the base class does not have the function being overridden as virtual. The 
  original designers (Stroustrup et al) took out, for presumably good reasons, 
  though I cannot for the life of me think what! There is even a number 
  proposals, e.g. <A 
  href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2108.html">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2108.html</A>, 
  to put a variants of it back and Microsoft have even done so, <A 
  href="http://msdn2.microsoft.com/en-us/library/41w3sh1c.aspx">http://msdn2.microsoft.com/en-us/library/41w3sh1c.aspx</A>, 
  on their latest compiler.<o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal>Anyway we have to deal with existing compilers and this 
  problem is really insidious, but we think the gains are worth the pain. And we 
  have provided a work around for people.<o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal>So, what we need from you guys is please check out the 
  PTLib and OPAL in the branches:<o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal>   <A 
  href="https://opalvoip.svn.sourceforge.net/svnroot/opalvoip/ptlib/branches/BooleanChange">https://opalvoip.svn.sourceforge.net/svnroot/opalvoip/ptlib/branches/BooleanChange</A><o:p></o:p></P>
  <P class=MsoNormal>   <A 
  href="https://opalvoip.svn.sourceforge.net/svnroot/opalvoip/opal/branches/BooleanChange">https://opalvoip.svn.sourceforge.net/svnroot/opalvoip/opal/branches/BooleanChange</A><o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal>and compile your programs against it. Now by default it 
  will use the ANSI bool form of PBoolean, so any overrides of PTLib or OPAL 
  functions must be changed to use PBoolean instead of BOOL. For those not using 
  MFC, this is really easy, just do a complete search and replace everywhere of 
  BOOL to PBoolean (or better yet, just bool) and that should do the job. Oh, 
  you might like to search and replace TRUE to true and FALSE to false while you 
  are at it, though you don’t HAVE to do that.<o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal>Now, for those that simply do not wish to make these 
  changes, we have a backward compatibility option: use the<o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 9pt; FONT-FAMILY: 'Lucida Console'">  
  --disable-ansi-bool</SPAN><o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal>option with configure (both Unix and Win32) and PBoolean is 
  defined as BOOL instead of bool. This should (in theory) be 100% compatible 
  with the previous signatures. So no changes to applications based on PTLib 
  need be made.<o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal>But we need you guys to CHECK THAT THIS IS 
  OK!<o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal>We are currently proposing to merge it into the trunk on 
  Monday 26<SUP>th</SUP> of November, we are happy to extend that if asked, but 
  will not wait forever, the back merging is really painful!<o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal>P.S. A random note to developers, the PBoolean is only 
  there for backward compatibility. It is recommended that any NEW functions all 
  just use the bool keyword. Use lowercase true and false too.<o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal>P.P.S. Sorry about all the shouting ... <SPAN 
  style="FONT-FAMILY: Wingdings">J</SPAN><o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P class=MsoNormal>Robert Jongbloed<o:p></o:p></P>
  <P class=MsoNormal>OPAL/OpenH323 Architect and Co-founder.<o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P></DIV></BLOCKQUOTE></BODY></HTML>