[Swift-commit] cog r3982

swift at ci.uchicago.edu swift at ci.uchicago.edu
Wed Jun 25 17:25:26 CDT 2014


------------------------------------------------------------------------
r3982 | timgarmstrong | 2014-06-25 17:25:04 -0500 (Wed, 25 Jun 2014) | 1 line

Add const attribute where appropriate
------------------------------------------------------------------------
Index: modules/provider-coaster-c-client/src/coasters.cpp
===================================================================
--- modules/provider-coaster-c-client/src/coasters.cpp	(revision 3981)
+++ modules/provider-coaster-c-client/src/coasters.cpp	(working copy)
@@ -430,13 +430,13 @@
 }
 
 job_id_t
-coaster_job_get_id(coaster_job *job) COASTERS_THROWS_NOTHING {
+coaster_job_get_id(const coaster_job *job) COASTERS_THROWS_NOTHING {
   // Shouldn't throw anything from accessor method
   return job->getIdentity();
 }
 
 coaster_rc
-coaster_job_status_code(coaster_job *job, coaster_job_status *code)
+coaster_job_status_code(const coaster_job *job, coaster_job_status *code)
                                             COASTERS_THROWS_NOTHING {
   const JobStatus *status;
   if (job == NULL || (status = job->getStatus()) == NULL) {
@@ -449,7 +449,7 @@
 }
 
 coaster_rc
-coaster_job_get_outstreams(coaster_job *job,
+coaster_job_get_outstreams(const coaster_job *job,
                 const char **stdout_s, size_t *stdout_len,
                 const char **stderr_s, size_t *stderr_len)
                 COASTERS_THROWS_NOTHING {
Index: modules/provider-coaster-c-client/src/coasters.h
===================================================================
--- modules/provider-coaster-c-client/src/coasters.h	(revision 3981)
+++ modules/provider-coaster-c-client/src/coasters.h	(working copy)
@@ -252,14 +252,14 @@
  * a coasters job that is assigned when the job is created.
  */
 job_id_t 
-coaster_job_get_id(coaster_job *job) COASTERS_THROWS_NOTHING;
+coaster_job_get_id(const coaster_job *job) COASTERS_THROWS_NOTHING;
 
 /*
  * Get status of a submitted job.
  * Return COASTER_ERROR_INVALID if job is invalid or has no status.
  */
 coaster_rc
-coaster_job_status_code(coaster_job *job, coaster_job_status *code)
+coaster_job_status_code(const coaster_job *job, coaster_job_status *code)
                 COASTERS_THROWS_NOTHING;
 
 /*
@@ -268,7 +268,7 @@
  * are owned by job: will become invalid if job is freed.
  */
 coaster_rc
-coaster_job_get_outstreams(coaster_job *job,
+coaster_job_get_outstreams(const coaster_job *job,
                 const char **stdout_s, size_t *stdout_len,
                 const char **stderr_s, size_t *stderr_len)
                 COASTERS_THROWS_NOTHING;



More information about the Swift-commit mailing list