Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
319b28a3
Commit
319b28a3
authored
Dec 29, 2013
by
Damien George
Browse files
Merge pull request #3 from pfalcon/for-upstream
Trivial fixes for building unix version
parents
5ebbfe7e
729fd12f
Changes
2
Hide whitespace changes
Inline
Side-by-side
py/lexerunix.c
View file @
319b28a3
...
...
@@ -48,8 +48,13 @@ mp_lexer_t *mp_lexer_new_from_file(const char *filename) {
uint
size
=
lseek
(
fd
,
0
,
SEEK_END
);
lseek
(
fd
,
0
,
SEEK_SET
);
char
*
data
=
m_new
(
char
,
size
);
read
(
fd
,
data
,
size
);
int
read_size
=
read
(
fd
,
data
,
size
);
close
(
fd
);
if
(
read_size
!=
size
)
{
printf
(
"error reading file %s
\n
"
,
filename
);
m_free
(
data
);
return
NULL
;
}
return
mp_lexer_new_from_str_len
(
filename
,
data
,
size
,
true
);
}
unix/Makefile
View file @
319b28a3
...
...
@@ -65,7 +65,7 @@ $(PROG): $(BUILD) $(OBJ)
size
$(PROG)
$(BUILD)
:
mkdir
$@
mkdir
-p
$@
$(BUILD)/%.o
:
%.c
$(CC)
$(CFLAGS)
-c
-o
$@
$<
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment