Remove unused arg 'defer' in 'job_start' #1000

* With the changes in commit
  "events: Refactor how event deferral is handled"
  (2e4ea29d2c) the function argument
  'defer' of 'job_start' and member variable 'defer' of 'struct job'
  can be removed.
* Update/Fix the documentation for function 'job_start'.
This commit is contained in:
oni-link
2014-07-29 13:11:34 +02:00
committed by Nicolas Hillegeer
parent a98a6996c2
commit 1ef12f0204
4 changed files with 3 additions and 11 deletions

View File

@@ -10498,7 +10498,6 @@ static void f_job_start(typval_T *argvars, typval_T *rettv)
on_job_stdout, on_job_stdout,
on_job_stderr, on_job_stderr,
on_job_exit, on_job_exit,
true,
0, 0,
&rettv->vval.v_number); &rettv->vval.v_number);

View File

@@ -96,7 +96,6 @@ uint64_t channel_from_job(char **argv)
job_out, job_out,
job_err, job_err,
NULL, NULL,
true,
0, 0,
&status); &status);

View File

@@ -39,7 +39,6 @@ struct job {
int pending_closes; int pending_closes;
// If the job was already stopped // If the job was already stopped
bool stopped; bool stopped;
bool defer;
// Data associated with the job // Data associated with the job
void *data; void *data;
// Callbacks // Callbacks
@@ -130,19 +129,16 @@ void job_teardown(void)
/// on stdout /// on stdout
/// @param stderr_cb Callback that will be invoked when data is available /// @param stderr_cb Callback that will be invoked when data is available
/// on stderr /// on stderr
/// @param exit_cb Callback that will be invoked when the job exits /// @param job_exit_cb Callback that will be invoked when the job exits
/// @param defer If the job callbacks invocation should be deferred to vim
/// main loop
/// @param maxmem Maximum amount of memory used by the job WStream /// @param maxmem Maximum amount of memory used by the job WStream
/// @param[out] The job id if the job started successfully, 0 if the job table /// @param[out] status The job id if the job started successfully, 0 if the job
/// is full, -1 if the program could not be executed. /// table is full, -1 if the program could not be executed.
/// @return The job pointer if the job started successfully, NULL otherwise /// @return The job pointer if the job started successfully, NULL otherwise
Job *job_start(char **argv, Job *job_start(char **argv,
void *data, void *data,
rstream_cb stdout_cb, rstream_cb stdout_cb,
rstream_cb stderr_cb, rstream_cb stderr_cb,
job_exit_cb job_exit_cb, job_exit_cb job_exit_cb,
bool defer,
size_t maxmem, size_t maxmem,
int *status) int *status)
{ {
@@ -187,7 +183,6 @@ Job *job_start(char **argv,
job->proc_stdin.data = NULL; job->proc_stdin.data = NULL;
job->proc_stdout.data = NULL; job->proc_stdout.data = NULL;
job->proc_stderr.data = NULL; job->proc_stderr.data = NULL;
job->defer = defer;
// Initialize the job std{in,out,err} // Initialize the job std{in,out,err}
uv_pipe_init(uv_default_loop(), &job->proc_stdin, 0); uv_pipe_init(uv_default_loop(), &job->proc_stdin, 0);

View File

@@ -280,7 +280,6 @@ int os_system(const char *cmd,
system_data_cb, system_data_cb,
system_data_cb, system_data_cb,
NULL, NULL,
false,
0, 0,
&i); &i);