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

Tree is second argument to geef_index_read_tree #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kjg
Copy link

@kjg kjg commented Mar 6, 2019

Currently calling geef_index.read_tree(index, tree) raises an Argument Error, it looks like this is due to using the first argument twice in the underlying c code:

geef/c_src/index.c

Lines 83 to 87 in 9e9aa23

if (!enif_get_resource(env, argv[0], geef_index_type, (void **) &index))
return enif_make_badarg(env);
if (!enif_get_resource(env, argv[0], geef_object_type, (void **) &tree))
return enif_make_badarg(env);

This PR updates the second call to enif_get_resource to use the second argument (argv[0])

I got to here by following the call stack below:

Reply = geef_nif:index_read_tree(Handle, TreeHandle),

index_read_tree(_Handle, _TreeHandle) ->

@kjg kjg changed the title Tree is second argument Tree is second argument to geef_index_read_tree Mar 6, 2019
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.

1 participant