-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ruby 3.2 warning "undefining the allocator of T_DATA class swig_runtime_data" #115
Comments
Some reading:
Seems like swig will need a fix after this line: https://github.com/swig/swig/blob/5a10e103992c49b8b402745b294fcdd4ca48e705/Lib/ruby/rubyrun.swg#L415 Will try to reproduce and then raise an issue and maybe PR in swig. |
…untime_data" Ruby 3.2 (still in development) started warning about this, see https://bugs.ruby-lang.org/issues/18007. Note that the extension docs mention it in https://ruby-doc.org/core-3.1.1/doc/extension_rdoc.html#label-C+struct+to+Ruby+object: > The klass argument is the class for the object. The klass should > derive from `rb_cObject`, and the allocator must be set by calling > `rb_define_alloc_func` or `rb_undef_alloc_func`. So in this case we call `rb_undef_alloc_func` to fix the warning. Verified that this works in robinst/taglib-ruby#115. Fixes swig#2257.
Raised an issue and a PR in the swig repo for this: swig/swig#2257 |
…untime_data" Ruby 3.2 (still in development) started warning about this, see https://bugs.ruby-lang.org/issues/18007. Note that the extension docs mention it in https://ruby-doc.org/core-3.1.1/doc/extension_rdoc.html#label-C+struct+to+Ruby+object: > The klass argument is the class for the object. The klass should > derive from `rb_cObject`, and the allocator must be set by calling > `rb_define_alloc_func` or `rb_undef_alloc_func`. So in this case we call `rb_undef_alloc_func` to fix the warning. Verified that this works in robinst/taglib-ruby#115. Fixes #2257.
The fix has been merged (that was quick!), so now we can wait for the next release of swig (4.1.0), regenerate wrappers and that should fix it. |
So I was poking at regenerating the wrappers and I quickly ran into the problem that the command encoder has been removed in 4.1.0! I tried poking at the two renames that use it (had never touched any SWIG code before so it took a while) and eventually discovered the problems of why we were using the command encoder in the first place (because we need to lowercase & also remove/add prefix/suffix). I had the crazy idea of trying to add support to DOH in SWIG to support multiple encoders looking something like Wondering if you had already looking into this and hit the same problems @robinst, and if you had any thoughts as to a better/easier fix. I'm very down to help implement whatever we come up with! |
Hey @fusion2004! Hadn't looked into this yet, but your comment was very helpful. I've looked into it now and I've found a way to do what we need with regex. I'll push the change shortly (still need to clean it up a bit). |
Ok, PR is up, have a look please: #122 |
Fix released in version 1.1.3 |
Originally posted by @jeremyevans in #85 (comment)
The text was updated successfully, but these errors were encountered: