[aravis] build: make aravis headers c++ compatible.



commit 527275efec7fd1f697e08364be3a173d4342c3c5
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Wed May 25 20:35:42 2011 +0200

    build: make aravis headers c++ compatible.

 src/arvgvcp.h |    6 +++---
 src/arvgvsp.h |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/arvgvcp.h b/src/arvgvcp.h
index 39fe7e7..c785cec 100644
--- a/src/arvgvcp.h
+++ b/src/arvgvcp.h
@@ -209,16 +209,16 @@ arv_gvcp_packet_get_packet_type (ArvGvcpPacket *packet)
 	if (packet == NULL)
 		return ARV_GVCP_PACKET_TYPE_ERROR;
 
-	return g_ntohs (packet->header.packet_type);
+	return (ArvGvcpPacketType) g_ntohs (packet->header.packet_type);
 }
 
 static inline ArvGvcpCommand
 arv_gvcp_packet_get_command (ArvGvcpPacket *packet)
 {
 	if (packet == NULL)
-		return 0;
+		return (ArvGvcpCommand) 0;
 
-	return g_ntohs (packet->header.command);
+	return (ArvGvcpCommand) g_ntohs (packet->header.command);
 }
 
 static inline void
diff --git a/src/arvgvsp.h b/src/arvgvsp.h
index ac23871..5627acd 100644
--- a/src/arvgvsp.h
+++ b/src/arvgvsp.h
@@ -88,14 +88,14 @@ void 			arv_gvsp_packet_debug 			(const ArvGvspPacket *packet, size_t packet_siz
 static inline ArvGvspPacketType
 arv_gvsp_packet_get_packet_type (const ArvGvspPacket *packet)
 {
-	return g_ntohs (packet->header.packet_type);
+	return (ArvGvspPacketType) g_ntohs (packet->header.packet_type);
 }
 
 static inline ArvGvspContentType
 arv_gvsp_packet_get_content_type (const ArvGvspPacket *packet)
 {
-	return (g_ntohl (packet->header.packet_infos) & ARV_GVSP_PACKET_INFOS_CONTENT_TYPE_MASK) >>
-		ARV_GVSP_PACKET_INFOS_CONTENT_TYPE_POS;
+	return (ArvGvspContentType) ((g_ntohl (packet->header.packet_infos) & ARV_GVSP_PACKET_INFOS_CONTENT_TYPE_MASK) >>
+		ARV_GVSP_PACKET_INFOS_CONTENT_TYPE_POS);
 }
 
 static inline guint16



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]