[libcamera-devel,RFC,01/10] libcamera: ipa_module_info: remove cplusplus guards

Message ID 20190605221817.966-2-paul.elder@ideasonboard.com
State Superseded
Headers show
Series
  • Add IPA process isolation
Related show

Commit Message

Paul Elder June 5, 2019, 10:18 p.m. UTC
IPA modules must be implemented in C++, which means we no longer need
__cplusplus guards, so remove them.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
---
 include/libcamera/ipa/ipa_module_info.h | 8 --------
 1 file changed, 8 deletions(-)

Comments

Laurent Pinchart June 6, 2019, 9:37 a.m. UTC | #1
Hi Paul,

Thank you for the patch.

On Wed, Jun 05, 2019 at 06:18:08PM -0400, Paul Elder wrote:
> IPA modules must be implemented in C++, which means we no longer need
> __cplusplus guards, so remove them.
> 
> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>

We may reconsider this later if we find out that exposing a C++ object
makes preserving the ABI more difficult, but for now

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  include/libcamera/ipa/ipa_module_info.h | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/include/libcamera/ipa/ipa_module_info.h b/include/libcamera/ipa/ipa_module_info.h
> index 803b5d3..585f753 100644
> --- a/include/libcamera/ipa/ipa_module_info.h
> +++ b/include/libcamera/ipa/ipa_module_info.h
> @@ -11,9 +11,7 @@
>  
>  #define IPA_MODULE_API_VERSION 1
>  
> -#ifdef __cplusplus
>  namespace libcamera {
> -#endif
>  
>  struct IPAModuleInfo {
>  	int moduleAPIVersion;
> @@ -22,16 +20,10 @@ struct IPAModuleInfo {
>  	char name[256];
>  } __attribute__((packed));
>  
> -#ifdef __cplusplus
>  extern "C" {
> -#endif
>  extern const struct IPAModuleInfo ipaModuleInfo;
> -#ifdef __cplusplus
>  };
> -#endif
>  
> -#ifdef __cplusplus
>  }; /* namespace libcamera */
> -#endif
>  
>  #endif /* __LIBCAMERA_IPA_MODULE_INFO_H__ */
> -- 
> 2.20.1
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/include/libcamera/ipa/ipa_module_info.h b/include/libcamera/ipa/ipa_module_info.h
index 803b5d3..585f753 100644
--- a/include/libcamera/ipa/ipa_module_info.h
+++ b/include/libcamera/ipa/ipa_module_info.h
@@ -11,9 +11,7 @@ 
 
 #define IPA_MODULE_API_VERSION 1
 
-#ifdef __cplusplus
 namespace libcamera {
-#endif
 
 struct IPAModuleInfo {
 	int moduleAPIVersion;
@@ -22,16 +20,10 @@  struct IPAModuleInfo {
 	char name[256];
 } __attribute__((packed));
 
-#ifdef __cplusplus
 extern "C" {
-#endif
 extern const struct IPAModuleInfo ipaModuleInfo;
-#ifdef __cplusplus
 };
-#endif
 
-#ifdef __cplusplus
 }; /* namespace libcamera */
-#endif
 
 #endif /* __LIBCAMERA_IPA_MODULE_INFO_H__ */