This repository was archived by the owner on Jul 22, 2024. It is now read-only.
Closed
Conversation
proc.e is now a union type and the only way to assign values to it is by converting the raw data to a fixed size byte array.
Collaborator
|
I ran into a lot of trouble adapting 1.4 because there were significant
changes to the core types and macros. I will look this over later tonight
but I am honestly a little pessimistic that you fixed it so quickly. :)
Either way thanks for looking into it. Ping me if you don't hear from me by
tomorrow morning.
…On Wed, Feb 6, 2019 at 1:44 PM Bence Monus ***@***.***> wrote:
These changes should fix the build against MRuby 2.0.0. [#72
<#72>]
The example code in the readme runs fine.
At least one test blows up with a stack corruption error so some
additional fixes are needed. There may well be better ways to do this, the
change in value.go is especially ugly but fixing this has already pushed
my cgo to the limits so I can't do more I'm afraid. Hopefully this will
help others to pick up the project and give it some more love.
------------------------------
You can view, comment on, or merge this pull request online at:
#73
Commit Summary
- mrb_ary_len was replaced with a macro that needs a wrapper
- update code with RProc struct changes
File Changes
- *M* array.go
<https://github.com/mitchellh/go-mruby/pull/73/files#diff-0> (3)
- *M* func.go
<https://github.com/mitchellh/go-mruby/pull/73/files#diff-1> (2)
- *M* value.go
<https://github.com/mitchellh/go-mruby/pull/73/files#diff-2> (2)
Patch Links:
- https://github.com/mitchellh/go-mruby/pull/73.patch
- https://github.com/mitchellh/go-mruby/pull/73.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#73>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABJ6wDojmmGozumBVT_1nLMHqR_6-xeks5vK0yygaJpZM4amK7K>
.
|
Author
|
@erikh I'm pretty sure I haven't "fixed" it, I just managed to get the code to compile :) |
Collaborator
|
Fair play! I'll see if I can help when I review.
…On Wed, Feb 6, 2019 at 2:30 PM Bence Monus ***@***.***> wrote:
@erikh <https://github.com/erikh> I'm pretty sure I haven't "fixed" it, I
just managed to get the code to compile :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#73 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABJ6xEXJOGSPrb1YFd15rxorWxc6EB5ks5vK1eSgaJpZM4amK7K>
.
|
erikh
reviewed
Feb 7, 2019
array.go
Outdated
| package mruby | ||
|
|
||
| // #include "gomruby.h" | ||
| // mrb_int _mrb_ary_len(mrb_value ary) { return RARRAY_LEN(ary); } |
Collaborator
There was a problem hiding this comment.
Please put this definition in gomruby.h instead of here.
Author
There was a problem hiding this comment.
Yep, I thought about this one after I went to bed.
| func (v *MrbValue) SetProcTargetClass(c *Class) { | ||
| proc := C._go_mrb_proc_ptr(v.value) | ||
| proc.target_class = c.class | ||
| proc.e = *(*[8]byte)(unsafe.Pointer(&c.class)) |
Collaborator
There was a problem hiding this comment.
yeah this isn't going to work, unless 2.0 has reverted some of the structs this will fail; the target_class notion has completely been changed in 1.4.
I need to read the 2.0 source before I can comment further.
Collaborator
|
any progress with this? I was curious if you had a chance to figure out the trampoline changes. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
These changes should fix the build against MRuby 2.0.0. [#72]
The example code in the readme runs fine.
At least one test blows up with a stack corruption error so some additional fixes are needed. There may well be better ways to do this, the change in
value.gois especially ugly but fixing this has already pushed my cgo to the limits so I can't do more I'm afraid. Hopefully this will help others to pick up the project and give it some more love.