Add const for most of the babeltrace APi calls
[lttngtop.git] / src / common.c
index d9ec95b33281f07628cece74325414109647fac5..df2ef7a4d376a395587815939dc224fa1926cab9 100644 (file)
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- * MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #include <babeltrace/ctf/events.h>
@@ -21,9 +20,9 @@
 #include <string.h>
 #include "common.h"
 
-uint64_t get_cpu_id(struct bt_ctf_event *event)
+uint64_t get_cpu_id(const struct bt_ctf_event *event)
 {
-       struct definition *scope;
+       const struct definition *scope;
        uint64_t cpu_id;
 
        scope = bt_ctf_get_top_level_scope(event, BT_STREAM_PACKET_CONTEXT);
@@ -36,9 +35,9 @@ uint64_t get_cpu_id(struct bt_ctf_event *event)
        return cpu_id;
 }
 
-uint64_t get_context_tid(struct bt_ctf_event *event)
+uint64_t get_context_tid(const struct bt_ctf_event *event)
 {
-       struct definition *scope;
+       const struct definition *scope;
        uint64_t tid;
 
        scope = bt_ctf_get_top_level_scope(event, BT_STREAM_EVENT_CONTEXT);
@@ -52,9 +51,9 @@ uint64_t get_context_tid(struct bt_ctf_event *event)
        return tid;
 }
 
-uint64_t get_context_pid(struct bt_ctf_event *event)
+uint64_t get_context_pid(const struct bt_ctf_event *event)
 {
-       struct definition *scope;
+       const struct definition *scope;
        uint64_t pid;
 
        scope = bt_ctf_get_top_level_scope(event, BT_STREAM_EVENT_CONTEXT);
@@ -68,9 +67,9 @@ uint64_t get_context_pid(struct bt_ctf_event *event)
        return pid;
 }
 
-uint64_t get_context_ppid(struct bt_ctf_event *event)
+uint64_t get_context_ppid(const struct bt_ctf_event *event)
 {
-       struct definition *scope;
+       const struct definition *scope;
        uint64_t ppid;
 
        scope = bt_ctf_get_top_level_scope(event, BT_STREAM_EVENT_CONTEXT);
@@ -84,9 +83,9 @@ uint64_t get_context_ppid(struct bt_ctf_event *event)
        return ppid;
 }
 
-char *get_context_comm(struct bt_ctf_event *event)
+char *get_context_comm(const struct bt_ctf_event *event)
 {
-       struct definition *scope;
+       const struct definition *scope;
        char *comm;
 
        scope = bt_ctf_get_top_level_scope(event, BT_STREAM_EVENT_CONTEXT);
This page took 0.024329 seconds and 4 git commands to generate.