| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a7f61ee commit 1cb96b4
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -173,7 +173,8 @@ | |||
| 173 | 173 | "out": { | |
| 174 | 174 | "isReturn": true, | |
| 175 | 175 | "cppClassName": "GitBuf", | |
| 176 | - "jsClassName": "Buffer" | ||
| 176 | + "jsClassName": "Buffer", | ||
| 177 | + "shouldAlloc": true | ||
| 177 | 178 | }, | |
| 178 | 179 | "blob": { | |
| 179 | 180 | "cppClassName": "GitBlob", | |
@@ -259,7 +260,8 @@ | |||
| 259 | 260 | "isReturn": true, | |
| 260 | 261 | "cppClassName": "GitBuf", | |
| 261 | 262 | "jsClassName": "Buffer", | |
| 262 | - "cType": "git_buf *" | ||
| 263 | + "cType": "git_buf *", | ||
| 264 | + "shouldAlloc": true | ||
| 263 | 265 | }, | |
| 264 | 266 | "repo": { | |
| 265 | 267 | "cppClassName": "GitRepository", | |
@@ -307,9 +309,9 @@ | |||
| 307 | 309 | "jsFunctionName": "grow", | |
| 308 | 310 | "args": { | |
| 309 | 311 | "buffer": { | |
| 310 | - "isReturn": true, | ||
| 311 | - "isSelf": false, | ||
| 312 | - "shouldAlloc": true | ||
| 312 | + "isReturn": false, | ||
| 313 | + "isSelf": true, | ||
| 314 | + "shouldAlloc": false | ||
| 313 | 315 | } | |
| 314 | 316 | }, | |
| 315 | 317 | "return": { | |
@@ -324,10 +326,9 @@ | |||
| 324 | 326 | "jsFunctionName": "set", | |
| 325 | 327 | "args": { | |
| 326 | 328 | "buffer": { | |
| 327 | - "isReturn": true, | ||
| 328 | - "isSelf": false, | ||
| 329 | - "shouldAlloc": true, | ||
| 330 | - "doNotConvert": true | ||
| 329 | + "isReturn": false, | ||
| 330 | + "isSelf": true, | ||
| 331 | + "shouldAlloc": false | ||
| 331 | 332 | }, | |
| 332 | 333 | "data": { | |
| 333 | 334 | "cppClassName": "Buffer", | |
@@ -538,6 +539,19 @@ | |||
| 538 | 539 | "return": { | |
| 539 | 540 | "ownedByThis": true | |
| 540 | 541 | } | |
| 542 | + }, | ||
| 543 | + "git_commit_header_field": { | ||
| 544 | + "isAsync": true, | ||
| 545 | + "args": { | ||
| 546 | + "out": { | ||
| 547 | + "isReturn": true, | ||
| 548 | + "isSelf": false, | ||
| 549 | + "shouldAlloc": true | ||
| 550 | + } | ||
| 551 | + }, | ||
| 552 | + "return": { | ||
| 553 | + "isErrorCode": true | ||
| 554 | + } | ||
| 541 | 555 | } | |
| 542 | 556 | } | |
| 543 | 557 | }, | |
@@ -602,6 +616,12 @@ | |||
| 602 | 616 | }, | |
| 603 | 617 | "git_config_get_string_buf": { | |
| 604 | 618 | "isAsync": true, | |
| 619 | + "args": { | ||
| 620 | + "out": { | ||
| 621 | + "isReturn": true, | ||
| 622 | + "shouldAlloc": true | ||
| 623 | + } | ||
| 624 | + }, | ||
| 605 | 625 | "return": { | |
| 606 | 626 | "isErrorCode": true | |
| 607 | 627 | } | |
@@ -674,6 +694,19 @@ | |||
| 674 | 694 | "return": { | |
| 675 | 695 | "isErrorCode": true | |
| 676 | 696 | } | |
| 697 | + }, | ||
| 698 | + "git_config_find_programdata": { | ||
| 699 | + "isAsync": true, | ||
| 700 | + "return": { | ||
| 701 | + "isErrorCode": true | ||
| 702 | + }, | ||
| 703 | + "args": { | ||
| 704 | + "out": { | ||
| 705 | + "isReturn": true, | ||
| 706 | + "isSelf": false, | ||
| 707 | + "shouldAlloc": true | ||
| 708 | + } | ||
| 709 | + } | ||
| 677 | 710 | } | |
| 678 | 711 | }, | |
| 679 | 712 | "dependencies": [ | |
@@ -883,6 +916,19 @@ | |||
| 883 | 916 | "git_diff_status_char": { | |
| 884 | 917 | "ignore": true | |
| 885 | 918 | }, | |
| 919 | + "git_diff_to_buf": { | ||
| 920 | + "isAsync": true, | ||
| 921 | + "return": { | ||
| 922 | + "isErrorCode": true | ||
| 923 | + }, | ||
| 924 | + "args": { | ||
| 925 | + "out": { | ||
| 926 | + "isReturn": true, | ||
| 927 | + "isSelf": false, | ||
| 928 | + "shouldAlloc": true | ||
| 929 | + } | ||
| 930 | + } | ||
| 931 | + }, | ||
| 886 | 932 | "git_diff_tree_to_index": { | |
| 887 | 933 | "args": { | |
| 888 | 934 | "old_tree": { | |
@@ -1969,7 +2015,9 @@ | |||
| 1969 | 2015 | "isAsync": true, | |
| 1970 | 2016 | "args": { | |
| 1971 | 2017 | "out": { | |
| 1972 | - "isReturn": true | ||
| 2018 | + "isReturn": true, | ||
| 2019 | + "shouldAlloc": true, | ||
| 2020 | + "isSelf": false | ||
| 1973 | 2021 | }, | |
| 1974 | 2022 | "remote": { | |
| 1975 | 2023 | "isSelf": true | |
@@ -2116,6 +2164,13 @@ | |||
| 2116 | 2164 | "isAsync": true, | |
| 2117 | 2165 | "return": { | |
| 2118 | 2166 | "isErrorCode": true | |
| 2167 | + }, | ||
| 2168 | + "args": { | ||
| 2169 | + "out": { | ||
| 2170 | + "isReturn": true, | ||
| 2171 | + "isSelf": false, | ||
| 2172 | + "shouldAlloc": true | ||
| 2173 | + } | ||
| 2119 | 2174 | } | |
| 2120 | 2175 | }, | |
| 2121 | 2176 | "git_repository_init_init_options": { | |
@@ -2479,6 +2534,19 @@ | |||
| 2479 | 2534 | "isErrorCode": true | |
| 2480 | 2535 | } | |
| 2481 | 2536 | }, | |
| 2537 | + "git_submodule_resolve_url": { | ||
| 2538 | + "isAsync": true, | ||
| 2539 | + "args": { | ||
| 2540 | + "out": { | ||
| 2541 | + "isReturn": true, | ||
| 2542 | + "shouldAlloc": true, | ||
| 2543 | + "isSelf": false | ||
| 2544 | + } | ||
| 2545 | + }, | ||
| 2546 | + "return": { | ||
| 2547 | + "isErrorCode": true | ||
| 2548 | + } | ||
| 2549 | + }, | ||
| 2482 | 2550 | "git_submodule_update": { | |
| 2483 | 2551 | "isAsync": true, | |
| 2484 | 2552 | "args": { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,15 +15,6 @@ NAN_METHOD({{ cppClassName }}::{{ cppFunctionName }}) { | |||
| 15 | 15 | {%if arg.globalPayload %} | |
| 16 | 16 | {{ cppFunctionName }}_globalPayload* globalPayload = new {{ cppFunctionName }}_globalPayload; | |
| 17 | 17 | {%endif%} | |
| 18 | - {%if arg.cppClassName == "GitBuf" %} | ||
| 19 | - {%if cppFunctionName == "Set"%} | ||
| 20 | - baton->{{arg.name}} = Nan::ObjectWrap::Unwrap<{{ arg.cppClassName }}>(info.This())->GetValue(); | ||
| 21 | - {%else%} | ||
| 22 | - baton->{{arg.name}} = ({{ arg.cType }})malloc(sizeof({{ arg.cType|replace '*' '' }})); | ||
| 23 | - baton->{{arg.name}}->ptr = NULL; | ||
| 24 | - baton->{{arg.name}}->size = baton->{{arg.name}}->asize = 0; | ||
| 25 | - {%endif%} | ||
| 26 | - {%endif%} | ||
| 27 | 18 | {%endeach%} | |
| 28 | 19 | ||
| 29 | 20 | {%each args|argsInfo as arg %} | |
@@ -61,9 +52,10 @@ NAN_METHOD({{ cppClassName }}::{{ cppFunctionName }}) { | |||
| 61 | 52 | {%endif%} | |
| 62 | 53 | {%endif%} | |
| 63 | 54 | {%elsif arg.shouldAlloc %} | |
| 55 | + baton->{{arg.name}} = ({{ arg.cType }})malloc(sizeof({{ arg.cType|replace '*' '' }})); | ||
| 64 | 56 | {%if arg.cppClassName == "GitBuf" %} | |
| 65 | - {%else%} | ||
| 66 | - baton->{{ arg.name }} = ({{ arg.cType }})malloc(sizeof({{ arg.cType|replace '*' '' }})); | ||
| 57 | + baton->{{arg.name}}->ptr = NULL; | ||
| 58 | + baton->{{arg.name}}->size = baton->{{arg.name}}->asize = 0; | ||
| 67 | 59 | {%endif%} | |
| 68 | 60 | {%endif%} | |
| 69 | 61 | {%endeach%} | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -405,7 +405,7 @@ describe("Filter", function() { | |||
| 405 | 405 | var message = "some new fancy filter"; | |
| 406 | 406 | var length = message.length; | |
| 407 | 407 | var tempBuffer = new Buffer(message, "utf-8"); | |
| 408 | - var largeBufferSize = 300000000; | ||
| 408 | + var largeBufferSize = 500000000; | ||
| 409 | 409 | ||
| 410 | 410 | it("should not apply when check returns GIT_PASSTHROUGH", function(){ | |
| 411 | 411 | var test = this; | |
@@ -600,7 +600,7 @@ describe("Filter", function() { | |||
| 600 | 600 | }) | |
| 601 | 601 | .then(function() { | |
| 602 | 602 | var fd = fse.openSync(readmePath, "r"); | |
| 603 | - var readBuf = Buffer.allocUnsafe(300000000); | ||
| 603 | + var readBuf = Buffer.allocUnsafe(largeBufferSize); | ||
| 604 | 604 | var readLength = fse.readSync( | |
| 605 | 605 | fd, | |
| 606 | 606 | readBuf, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments