[asterisk-commits] Forward declare 'struct ast json' in asterisk.h (asterisk[14])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Apr 1 07:06:28 CDT 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/5373 )

Change subject: Forward declare 'struct ast_json' in asterisk.h
......................................................................


Forward declare 'struct ast_json' in asterisk.h

The ast_json structure is used in many Asterisk headers and is often the
only part of json.h used.  This adds a forward declaration to asterisk.h
and removes the include of json.h from many headers.  The declaration
has been left in endpoints.h and stasis.h to avoid problems with source
files that use ast_json functions without directly including json.h.

ari.h continues to include json.h as it uses enum
ast_json_encoding_format.

Change-Id: Id766aabce6bed56626d27e8d29f559b5e687b769
---
M include/asterisk.h
M include/asterisk/channel.h
M include/asterisk/stasis_app.h
M include/asterisk/stasis_channels.h
M include/asterisk/stasis_endpoints.h
M include/asterisk/stasis_system.h
6 files changed, 1 insertion(+), 5 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, but someone else must approve
  Richard Mudgett: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/include/asterisk.h b/include/asterisk.h
index f3f8b3a..4fc070b 100644
--- a/include/asterisk.h
+++ b/include/asterisk.h
@@ -275,6 +275,7 @@
 struct ast_variable;
 struct ast_str;
 struct ast_sched_context;
+struct ast_json;
 
 /* Some handy macros for turning a preprocessor token into (effectively) a quoted string */
 #define __stringify_1(x)	#x
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index a57a0b4..a2c4277 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -178,7 +178,6 @@
 #include "asterisk/ccss.h"
 #include "asterisk/framehook.h"
 #include "asterisk/stasis.h"
-#include "asterisk/json.h"
 #include "asterisk/endpoints.h"
 
 #define DATASTORE_INHERIT_FOREVER	INT_MAX
diff --git a/include/asterisk/stasis_app.h b/include/asterisk/stasis_app.h
index e131833..ca5c251 100644
--- a/include/asterisk/stasis_app.h
+++ b/include/asterisk/stasis_app.h
@@ -51,7 +51,6 @@
  */
 
 #include "asterisk/channel.h"
-#include "asterisk/json.h"
 
 /*! @{ */
 
diff --git a/include/asterisk/stasis_channels.h b/include/asterisk/stasis_channels.h
index deb79b0..4843617 100644
--- a/include/asterisk/stasis_channels.h
+++ b/include/asterisk/stasis_channels.h
@@ -22,7 +22,6 @@
 
 #include "asterisk/stringfields.h"
 #include "asterisk/stasis.h"
-#include "asterisk/json.h"
 #include "asterisk/channel.h"
 
 /*! \addtogroup StasisTopicsAndMessages
diff --git a/include/asterisk/stasis_endpoints.h b/include/asterisk/stasis_endpoints.h
index 539f270..2fbe5f4 100644
--- a/include/asterisk/stasis_endpoints.h
+++ b/include/asterisk/stasis_endpoints.h
@@ -28,7 +28,6 @@
  */
 
 #include "asterisk/endpoints.h"
-#include "asterisk/json.h"
 #include "asterisk/stasis.h"
 #include "asterisk/stasis_cache_pattern.h"
 #include "asterisk/stringfields.h"
diff --git a/include/asterisk/stasis_system.h b/include/asterisk/stasis_system.h
index 274c02e..5595906 100644
--- a/include/asterisk/stasis_system.h
+++ b/include/asterisk/stasis_system.h
@@ -19,7 +19,6 @@
 #ifndef _ASTERISK_STASIS_SYSTEM_H
 #define _ASTERISK_STASIS_SYSTEM_H
 
-#include "asterisk/json.h"
 #include "asterisk/stasis.h"
 
 /*!

-- 
To view, visit https://gerrit.asterisk.org/5373
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id766aabce6bed56626d27e8d29f559b5e687b769
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>



More information about the asterisk-commits mailing list