mruby use RANGE_* macros - #697
Merged
Merged
Conversation
Use RANGE_* macros to be independent of the RRange struct implementation.
Member
|
Thank you for your contribution. It however does not compile:
[ 13%] Building CXX object CMakeFiles/tsc.dir/src/scripting/objects/sprites/mrb_particle_emitter.cpp.o
/home/quintus/repos/TSC/tsc/src/scripting/objects/sprites/mrb_particle_emitter.cpp: In function ‘void calculate_rand_values(mrb_state*, mrb_value, mrb_float&, mrb_float&)’:
/home/quintus/repos/TSC/tsc/src/scripting/objects/sprites/mrb_particle_emitter.cpp:66:37: error: ‘RANGE_BEG’ was not declared in this scope
beg = mrbnum2float(p_state, RANGE_BEG(p_range));
^~~~~~~~~
/home/quintus/repos/TSC/tsc/src/scripting/objects/sprites/mrb_particle_emitter.cpp:67:37: error: ‘RANGE_END’ was not declared in this scope
end = mrbnum2float(p_state, RANGE_END(p_range));
^~~~~~~~~
/home/quintus/repos/TSC/tsc/src/scripting/objects/sprites/mrb_particle_emitter.cpp: At global scope:
/home/quintus/repos/TSC/tsc/src/scripting/objects/sprites/mrb_particle_emitter.cpp:31:18: warning: ‘mrb_float mrbnum2float(mrb_state*, mrb_value)’ defined but not used [-Wunused-function]
static mrb_float mrbnum2float(mrb_state* p_state, mrb_value obj)
I suppose this is because the mruby version included in TSC's source
tree is too old. Once I get around to updating it I however see no
reason why this should not be applied. Do you know when these macros
were introduced?
Am 17. Mai 2021 um 06:07 Uhr -0700 schrieb Ferdinand Thiessen:
Mostly relevant if using system's mruby.
Out of curiosity, are you packaging TSC for some Linux distribution?
It would be nice if TSC would finally find its way there.
-quintus
|
Member
|
Nevermind, I just realised you are the same person who submitted the
ArchLinux-specific changes. Thanks for your efforts!
-quintus
|
Author
You are right TSC currently ships 2.0.0, that macros were added with 2.0.1
Yes, for openSUSE ;-) |
Author
Pushed a commit which updates the submodule to latest 2.x release (2.1.2). On openSUSE we build with mruby 3.0.0, so you could also consider upgrade to 3.x release series. |
Member
|
I've tested with your new changes, and it all appears to be well. I
could not find any broken levels or the like, and it compiles fine.
I've merged your changes.
Am 17. Mai 2021 um 12:52 Uhr -0700 schrieb Ferdinand Thiessen:
On openSUSE we build with mruby 3.0.0, so you could also consider
upgrade to 3.x release series.
I will look into it.
Finally, TSC in a Linux distribution. That's a step forward. I asked
other people before, but I was only responded that I should package
myself and join mentors mailinglists. For that however I lack the
time, so I am happy it now works out this way.
Would it be useful to you if we issued a release of what currently is
`devel'?
Thank you!
-quintus
…--
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | For security:
Passau, Germany | ***@***.*** | () Avoid HTML e-mail
European Union | PGP: see homepage | /\ http://asciiribbon.org
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use
RANGE_*macros to be independent of theRRangestruct implementation.Mostly relevant if using system's mruby.