Re: svn commit: r549766 - in /incubator/stdcxx/trunk: examples/manual/rwexcept.cpp include/rw/_error.h src/exception.cpp

2007-06-22 Thread Martin Sebor

[EMAIL PROTECTED] wrote:

Author: faridz
Date: Fri Jun 22 03:15:46 2007
New Revision: 549766

URL: http://svn.apache.org/viewvc?view=rev&rev=549766

[...]

Modified: incubator/stdcxx/trunk/include/rw/_error.h
URL: 
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/rw/_error.h?view=diff&rev=549766&r1=549765&r2=549766
==
--- incubator/stdcxx/trunk/include/rw/_error.h (original)
+++ incubator/stdcxx/trunk/include/rw/_error.h Fri Jun 22 03:15:46 2007
@@ -39,9 +39,12 @@
 // (if any) used to format the exception object's what() string
 void _RWSTD_EXPORT __rw_throw (int, ...);
 
+// frees memory buffer used for what() message

+void _RWSTD_EXPORT __rw_free_what_buf (char*);

^

[...]

Modified: incubator/stdcxx/trunk/src/exception.cpp
URL: 
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/exception.cpp?view=diff&rev=549766&r1=549765&r2=549766
==
--- incubator/stdcxx/trunk/src/exception.cpp (original)
+++ incubator/stdcxx/trunk/src/exception.cpp Fri Jun 22 03:15:46 2007
@@ -438,10 +438,13 @@
 static _RWSTD_THREAD int
 __rw_what_refcnt;
 
-inline void __rw_free_what_buf (char* buf)

+// free memory buffer allocated in __rw_vfmtwhat()
+_RWSTD_EXPORT inline void __rw_free_what_buf (char* buf)

   

From 7.1.2, p4: "If a function with external linkage is declared
inline in one translation unit, it shall be declared inline in all
translation units in which it appears; no diagnostic is required."

Also, I think the convention used in the rest of the code is to
put _RWSTD_EXPORT before the return type of the function, but
you might want to double-check that. Either way, it should be
consistent between the declaration and the definition of the
function.

Martin


RE: svn commit: r549766 - in /incubator/stdcxx/trunk: examples/manual/rwexcept.cpp include/rw/_error.h src/exception.cpp

2007-06-22 Thread Farid Zaripov
> -Original Message-
> From: Martin Sebor [mailto:[EMAIL PROTECTED] 
> Sent: Friday, June 22, 2007 6:38 PM
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: svn commit: r549766 - in 
> /incubator/stdcxx/trunk: examples/manual/rwexcept.cpp 
> include/rw/_error.h src/exception.cpp
> 

[...]

>  From 7.1.2, p4: "If a function with external linkage is 
> declared inline in one translation unit, it shall be declared 
> inline in all translation units in which it appears; no 
> diagnostic is required."
> 
> Also, I think the convention used in the rest of the code is 
> to put _RWSTD_EXPORT before the return type of the function, 
> but you might want to double-check that. Either way, it 
> should be consistent between the declaration and the 
> definition of the function.

  Done: http://svn.apache.org/viewvc?view=rev&rev=549862

Farid.


Re: svn commit: r549766 - in /incubator/stdcxx/trunk: examples/manual/rwexcept.cpp include/rw/_error.h src/exception.cpp

2007-06-22 Thread Martin Sebor

Farid Zaripov wrote:

-Original Message-
From: Martin Sebor [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 22, 2007 6:38 PM

To: stdcxx-dev@incubator.apache.org
Subject: Re: svn commit: r549766 - in 
/incubator/stdcxx/trunk: examples/manual/rwexcept.cpp 
include/rw/_error.h src/exception.cpp




[...]

 From 7.1.2, p4: "If a function with external linkage is 
declared inline in one translation unit, it shall be declared 
inline in all translation units in which it appears; no 
diagnostic is required."


Also, I think the convention used in the rest of the code is 
to put _RWSTD_EXPORT before the return type of the function, 
but you might want to double-check that. Either way, it 
should be consistent between the declaration and the 
definition of the function.


  Done: http://svn.apache.org/viewvc?view=rev&rev=549862


Sorry, this violates the last sentence of 3.2, p3:

An inline function shall be defined in every translation
unit in which it is used.

Martin