Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
7cc66cf8
Commit
7cc66cf8
authored
May 14, 2013
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1252 from carsonmcdonald/fixfilenames
Fix for issue 1243
parents
17f10b05
87eb57b6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
4 deletions
+15
-4
build_config.rb
build_config.rb
+5
-0
src/codegen.c
src/codegen.c
+7
-1
src/load.c
src/load.c
+0
-3
src/state.c
src/state.c
+1
-0
tasks/mruby_build_commands.rake
tasks/mruby_build_commands.rake
+2
-0
No files found.
build_config.rb
View file @
7cc66cf8
...
@@ -25,6 +25,11 @@ MRuby::Build.new do |conf|
...
@@ -25,6 +25,11 @@ MRuby::Build.new do |conf|
# cc.compile_options = "%{flags} -MMD -o %{outfile} -c %{infile}"
# cc.compile_options = "%{flags} -MMD -o %{outfile} -c %{infile}"
# end
# end
# mrbc settings
# conf.mrbc do |mrbc|
# mrbc.compile_options = "-g -B%{funcname} -o- -" # The -g option is required for line numbers
# end
# Linker settings
# Linker settings
# conf.linker do |linker|
# conf.linker do |linker|
# linker.command = ENV['LD'] || 'gcc'
# linker.command = ENV['LD'] || 'gcc'
...
...
src/codegen.c
View file @
7cc66cf8
...
@@ -2403,6 +2403,8 @@ scope_finish(codegen_scope *s)
...
@@ -2403,6 +2403,8 @@ scope_finish(codegen_scope *s)
{
{
mrb_state
*
mrb
=
s
->
mrb
;
mrb_state
*
mrb
=
s
->
mrb
;
mrb_irep
*
irep
=
s
->
irep
;
mrb_irep
*
irep
=
s
->
irep
;
size_t
fname_len
;
char
*
fname
;
irep
->
flags
=
0
;
irep
->
flags
=
0
;
if
(
s
->
iseq
)
{
if
(
s
->
iseq
)
{
...
@@ -2418,7 +2420,11 @@ scope_finish(codegen_scope *s)
...
@@ -2418,7 +2420,11 @@ scope_finish(codegen_scope *s)
irep
->
pool
=
(
mrb_value
*
)
codegen_realloc
(
s
,
irep
->
pool
,
sizeof
(
mrb_value
)
*
irep
->
plen
);
irep
->
pool
=
(
mrb_value
*
)
codegen_realloc
(
s
,
irep
->
pool
,
sizeof
(
mrb_value
)
*
irep
->
plen
);
irep
->
syms
=
(
mrb_sym
*
)
codegen_realloc
(
s
,
irep
->
syms
,
sizeof
(
mrb_sym
)
*
irep
->
slen
);
irep
->
syms
=
(
mrb_sym
*
)
codegen_realloc
(
s
,
irep
->
syms
,
sizeof
(
mrb_sym
)
*
irep
->
slen
);
if
(
s
->
filename
)
{
if
(
s
->
filename
)
{
irep
->
filename
=
s
->
filename
;
fname_len
=
strlen
(
s
->
filename
);
fname
=
codegen_malloc
(
s
,
fname_len
+
1
);
memcpy
(
fname
,
s
->
filename
,
fname_len
);
fname
[
fname_len
]
=
'\0'
;
irep
->
filename
=
fname
;
}
}
irep
->
nlocals
=
s
->
nlocals
;
irep
->
nlocals
=
s
->
nlocals
;
...
...
src/load.c
View file @
7cc66cf8
...
@@ -267,9 +267,6 @@ read_rite_lineno_record(mrb_state *mrb, const uint8_t *bin, size_t irepno, uint3
...
@@ -267,9 +267,6 @@ read_rite_lineno_record(mrb_state *mrb, const uint8_t *bin, size_t irepno, uint3
mrb
->
irep
[
irepno
]
->
lines
=
lines
;
mrb
->
irep
[
irepno
]
->
lines
=
lines
;
error_exit:
error_exit:
if
(
fname
)
{
mrb_free
(
mrb
,
fname
);
}
return
ret
;
return
ret
;
}
}
...
...
src/state.c
View file @
7cc66cf8
...
@@ -101,6 +101,7 @@ mrb_irep_free(mrb_state *mrb, struct mrb_irep *irep)
...
@@ -101,6 +101,7 @@ mrb_irep_free(mrb_state *mrb, struct mrb_irep *irep)
mrb_free
(
mrb
,
irep
->
iseq
);
mrb_free
(
mrb
,
irep
->
iseq
);
mrb_free
(
mrb
,
irep
->
pool
);
mrb_free
(
mrb
,
irep
->
pool
);
mrb_free
(
mrb
,
irep
->
syms
);
mrb_free
(
mrb
,
irep
->
syms
);
mrb_free
(
mrb
,
(
void
*
)
irep
->
filename
);
mrb_free
(
mrb
,
irep
->
lines
);
mrb_free
(
mrb
,
irep
->
lines
);
mrb_free
(
mrb
,
irep
);
mrb_free
(
mrb
,
irep
);
}
}
...
...
tasks/mruby_build_commands.rake
View file @
7cc66cf8
...
@@ -236,6 +236,8 @@ module MRuby
...
@@ -236,6 +236,8 @@ module MRuby
end
end
class
Command::Mrbc
<
Command
class
Command::Mrbc
<
Command
attr_accessor
:compile_options
def
initialize
(
build
)
def
initialize
(
build
)
super
super
@command
=
nil
@command
=
nil
...
...
Write
Preview
Markdown
is supported
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