On 15 February 2017 at 22:46, Ilia Mirkin wrote:
> Yeah, just like all the other headers:
>
> #ifdef __cplusplus
> extern "C" {
> #endif
>
> define api's
>
> #ifdef __cplusplus
> }
> #endif
>
> You can see examples in, e.g., u_bitcast.h (picked one at random).
>
Thanks for spotting this one Ilia.
azis, George
>> Cc: mesa-dev@lists.freedesktop.org
>> Subject: Re: [Mesa-dev] [PATCH] [swr] fix windows build
>>
>> I'd rather see the remainder of the headers fixed to be includable from C++
>> contexts. extern "C" { #include } is an anti-pattern...
>&
s, George
> Cc: mesa-dev@lists.freedesktop.org
> Subject: Re: [Mesa-dev] [PATCH] [swr] fix windows build
>
> I'd rather see the remainder of the headers fixed to be includable from C++
> contexts. extern "C" { #include } is an anti-pattern...
>
> -ilia
>
> On We
I'd rather see the remainder of the headers fixed to be includable
from C++ contexts. extern "C" { #include } is an anti-pattern...
-ilia
On Wed, Feb 15, 2017 at 5:23 PM, George Kyriazis
wrote:
> move util/u_upload_mgr.h inside extern "C"
> ---
> src/gallium/drivers/swr/swr_context.cpp | 2 +-
move util/u_upload_mgr.h inside extern "C"
---
src/gallium/drivers/swr/swr_context.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/swr/swr_context.cpp
b/src/gallium/drivers/swr/swr_context.cpp
index 2e37bac..04ff146 100644
--- a/src/gallium/drivers/swr/
The header file should, instead, have an extern "C" in it. Header
files should be safe to include in C++ code, most have extern "C"
guards, but some get missed.
Cheers,
-ilia
On Wed, Jan 4, 2017 at 12:41 PM, George Kyriazis
wrote:
> Explicitly declare lp_native_vector_width inside an extern "
Explicitly declare lp_native_vector_width inside an extern "C",
since we cannot include the correct header file inside extern "C".
---
src/gallium/drivers/swr/swr_screen.cpp | 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/swr/swr_screen.cpp