aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.cpp
diff options
context:
space:
mode:
authorGravatar Cheer Xiao <xiaqqaix@gmail.com>2012-12-31 23:54:17 +0800
committerGravatar Cheer Xiao <xiaqqaix@gmail.com>2012-12-31 23:54:17 +0800
commita9ada13a23a9f13af2520fbb2b49b59ec5ead085 (patch)
tree2993e48f790d4a4c1141e3d615a5e1ac4dd8a301 /parser.cpp
parent1ae0e5d7cb9a227f2e2fcc33ce3b41acd0ab9e14 (diff)
Use shared_ptr to manage io_data_t*.
Diffstat (limited to 'parser.cpp')
-rw-r--r--parser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/parser.cpp b/parser.cpp
index 361c3d0f..f418df8c 100644
--- a/parser.cpp
+++ b/parser.cpp
@@ -377,7 +377,7 @@ parser_t::parser_t(enum parser_type_t type, bool errors) :
job_start_pos(0),
eval_level(-1),
current_block(NULL),
- block_io(NULL)
+ block_io(shared_ptr<io_data_t>())
{
}
@@ -1495,7 +1495,7 @@ void parser_t::parse_job_argument_list(process_t *p,
case TOK_REDIRECT_NOCLOB:
{
int type = tok_last_type(tok);
- std::auto_ptr<io_data_t> new_io;
+ shared_ptr<io_data_t> new_io;
wcstring target;
bool has_target = false;
wchar_t *end;
@@ -1633,7 +1633,7 @@ void parser_t::parse_job_argument_list(process_t *p,
}
}
- j->io.push_back(new_io.release());
+ j->io.push_back(new_io);
}
break;