Skip to content

Commit 2e32eeb

Browse files
author
Carson Howard
committed
Fixed status_file special case
1 parent 34a9e59 commit 2e32eeb

2 files changed

Lines changed: 2 additions & 12 deletions

File tree

generate/input/descriptor.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2301,7 +2301,8 @@
23012301
"isAsync": true,
23022302
"args": {
23032303
"status_flags": {
2304-
"isReturn": true
2304+
"isReturn": true,
2305+
"shouldAlloc": true
23052306
},
23062307
"return": {
23072308
"isErrorCode": true

generate/templates/partials/async_function.cc

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ NAN_METHOD({{ cppClassName }}::{{ cppFunctionName }}) {
1010

1111
baton->error_code = GIT_OK;
1212
baton->error = NULL;
13-
{%if cppClassName == "GitStatus" %}
14-
{%if cppFunctionName == "File" %}
15-
baton->status_flags = (unsigned int *)malloc(sizeof(unsigned int));
16-
{%endif%}
17-
{%endif%}
1813

1914
{%each args|argsInfo as arg %}
2015
{%if arg.globalPayload %}
@@ -265,12 +260,6 @@ void {{ cppClassName }}::{{ cppFunctionName }}Worker::HandleOKCallback() {
265260
{%endeach%}
266261
}
267262

268-
{%if cppClassName == "GitStatus" %}
269-
{%if cppFunctionName == "File" %}
270-
free((void *)baton->status_flags);
271-
{%endif%}
272-
{%endif%}
273-
274263
{%each args|argsInfo as arg %}
275264
{%if arg.isCppClassStringOrArray %}
276265
{%if arg.freeFunctionName %}

0 commit comments

Comments
 (0)