Skip to content

Commit

Permalink
Merge pull request #4628 from unalos/4627
Browse files Browse the repository at this point in the history
Fixing arity of cdata_manage in documentation.
  • Loading branch information
melted committed Dec 26, 2018
2 parents 4594f92 + 46f3ebb commit 33d8d91
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/reference/ffi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,10 @@ Usage from C code
CData some_allocating_fun(int arg)
{
void * data = (void *) malloc(...);
size_t size = sizeof(...);
void * data = (void *) malloc(size);
// ...
return cdata_manage(data, finalizer);
return cdata_manage(data, size, finalizer);
}
int other_fun(CData cd, int arg)
Expand Down

0 comments on commit 33d8d91

Please sign in to comment.