Skip to content

Commit

Permalink
remove strdup
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_3@423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
matz committed Apr 13, 1999
1 parent 43e6b0a commit fc5e385
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions parse.y
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "node.h"
#include "st.h"
#include <stdio.h>
#include <string.h>
#include <errno.h>

/* hack for bison */
Expand Down Expand Up @@ -1608,7 +1607,7 @@ none : /* none */
static char *tokenbuf = NULL;
static int tokidx, toksiz = 0;

#ifndef strdup
#ifndef HAVE_STRDUP
char *strdup();
#endif

Expand Down Expand Up @@ -1722,7 +1721,7 @@ rb_compile_string(f, s, line)
lex_gets_ptr = 0;
lex_input = s;
lex_pbeg = lex_p = lex_pend = 0;
ruby_sourceline = line;
ruby_sourceline = line - 1;
compile_for_eval = 1;

return yycompile(f);
Expand Down Expand Up @@ -2072,7 +2071,7 @@ parse_regx(term, paren)
tokfix();
lex_state = EXPR_END;
if (list) {
nd_set_line(list, re_start-1);
nd_set_line(list, re_start);
if (toklen() > 0) {
VALUE ss = rb_str_new(tok(), toklen());
list_append(list, NEW_STR(ss));
Expand Down Expand Up @@ -2161,7 +2160,7 @@ parse_string(func, term, paren)
lex_state = EXPR_END;

if (list) {
nd_set_line(list, strstart-1);
nd_set_line(list, strstart);
if (toklen() > 0) {
VALUE ss = rb_str_new(tok(), toklen());
list_append(list, NEW_STR(ss));
Expand Down Expand Up @@ -2247,8 +2246,6 @@ parse_quotedword(term, paren)
return tDSTRING;
}

char *strdup();

static int
here_document(term, indent)
char term;
Expand Down Expand Up @@ -2365,7 +2362,7 @@ here_document(term, indent)
ruby_sourceline = linesave;

if (list) {
nd_set_line(list, linesave);
nd_set_line(list, linesave+1);
yylval.node = list;
}
switch (term) {
Expand Down

0 comments on commit fc5e385

Please sign in to comment.