Skip to content
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

Announces new capi hash functions. #3443

Merged

Conversation

fmfdias
Copy link
Contributor

@fmfdias fmfdias commented Jun 15, 2015

Hi,

This PR defines HAVE_RB_HASH_DUP and HAVE_RB_HASH_FREEZE to allow gems that check these definitions to know about their existence and avoid issues.

This fixes #3442.

Thank you!

brixen added a commit that referenced this pull request Jun 15, 2015
…_definitions

Announces new capi hash functions.
@brixen brixen merged commit d3bc182 into rubinius:master Jun 15, 2015
@sodabrew
Copy link
Contributor

The code in mysql2 extconf looks to see if the functions are available:

 have_func('rb_thread_blocking_region')
 have_func('rb_wait_for_single_fd')
 have_func('rb_hash_dup')
 have_func('rb_intern3')

These will define the macro HAVE_RB_HASH_DUP so that C code can handle the missing/available interfaces accordingly.

The underlying problem here is that have_func('rb_hash_dup') must have returned false. Let's fix that?

@sodabrew
Copy link
Contributor

Oh - I just saw https://github.com/rubinius/rubinius/blob/master/vm/include/capi/ruby/defines.h

So actually this is the way to declare the C APIs for the time being?

@brixen
Copy link
Member

brixen commented Jun 15, 2015

@sodabrew we don't build a library for Rubinius and that's what have_func relies on. Instead, we define the constants directly for things that need them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mysql2 gem 0.3.18 fails to compile native extension on Rubinius 2.5.6
3 participants