|
599 | 599 | "node_buffer.h", |
600 | 600 | "../include/blob.h", |
601 | 601 | "../include/repository.h", |
| 602 | + "../include/buf.h", |
602 | 603 | "../include/oid.h" |
603 | 604 | ], |
604 | 605 | "functions": [ |
|
1368 | 1369 | "fields": [] |
1369 | 1370 | }, |
1370 | 1371 | { |
1371 | | - "filename": "buffer.h", |
1372 | | - "ignore": false, |
1373 | | - "cppClassName": "GitBuffer", |
1374 | | - "jsClassName": "Buffer", |
1375 | 1372 | "cType": "git_buf", |
| 1373 | + "functions": [ |
| 1374 | + { |
| 1375 | + "cFunctionName": "git_buf_free", |
| 1376 | + "ignore": true, |
| 1377 | + "description": "<p>Free the memory referred to by the git_buf.</p>\n", |
| 1378 | + "cppFunctionName": "Free", |
| 1379 | + "jsFunctionName": "free", |
| 1380 | + "return": { |
| 1381 | + "cType": "void", |
| 1382 | + "comment": null, |
| 1383 | + "cppClassName": "void", |
| 1384 | + "jsClassName": "void" |
| 1385 | + }, |
| 1386 | + "isConstructorMethod": false, |
| 1387 | + "isPrototypeMethod": true, |
| 1388 | + "args": [ |
| 1389 | + { |
| 1390 | + "name": "buffer", |
| 1391 | + "cType": "git_buf *", |
| 1392 | + "cppClassName": "GitBuf", |
| 1393 | + "jsClassName": "Buf", |
| 1394 | + "comment": "The buffer to deallocate", |
| 1395 | + "isReturn": true, |
| 1396 | + "isSelf": false, |
| 1397 | + "shouldAlloc": true |
| 1398 | + } |
| 1399 | + ], |
| 1400 | + "isAsync": false, |
| 1401 | + "comment": "<p>Note that this does not free the <code>git_buf</code> itself, just the memory\n pointed to by <code>buffer->ptr</code>. This will not free the memory if it looks\n like it was not allocated internally, but it will clear the buffer back\n to the empty state.</p>\n" |
| 1402 | + }, |
| 1403 | + { |
| 1404 | + "cFunctionName": "git_buf_grow", |
| 1405 | + "ignore": false, |
| 1406 | + "description": "<p>Resize the buffer allocation to make more space.</p>\n", |
| 1407 | + "cppFunctionName": "Grow", |
| 1408 | + "jsFunctionName": "grow", |
| 1409 | + "return": { |
| 1410 | + "cType": "int", |
| 1411 | + "comment": " 0 on success, -1 on allocation failure", |
| 1412 | + "cppClassName": "Number", |
| 1413 | + "jsClassName": "Number", |
| 1414 | + "isErrorCode": true |
| 1415 | + }, |
| 1416 | + "isConstructorMethod": false, |
| 1417 | + "isPrototypeMethod": true, |
| 1418 | + "args": [ |
| 1419 | + { |
| 1420 | + "name": "buffer", |
| 1421 | + "cType": "git_buf *", |
| 1422 | + "cppClassName": "GitBuf", |
| 1423 | + "jsClassName": "Buf", |
| 1424 | + "comment": "The buffer to be resized; may or may not be allocated yet", |
| 1425 | + "isReturn": true, |
| 1426 | + "isSelf": false, |
| 1427 | + "shouldAlloc": true |
| 1428 | + }, |
| 1429 | + { |
| 1430 | + "name": "target_size", |
| 1431 | + "cType": "size_t", |
| 1432 | + "cppClassName": "Uint32", |
| 1433 | + "jsClassName": "Number", |
| 1434 | + "comment": "The desired available size", |
| 1435 | + "isReturn": false, |
| 1436 | + "isSelf": false, |
| 1437 | + "shouldAlloc": false |
| 1438 | + } |
| 1439 | + ], |
| 1440 | + "isAsync": true, |
| 1441 | + "comment": "<p>This will attempt to grow the buffer to accomodate the target size.</p>\n\n<p>If the buffer refers to memory that was not allocated by libgit2 (i.e.\n the <code>asize</code> field is zero), then <code>ptr</code> will be replaced with a newly\n allocated block of data. Be careful so that memory allocated by the\n caller is not lost. As a special variant, if you pass <code>target_size</code> as\n 0 and the memory is not allocated by libgit2, this will allocate a new\n buffer of size <code>size</code> and copy the external data into it.</p>\n\n<p>Currently, this will never shrink a buffer, only expand it.</p>\n\n<p>If the allocation fails, this will return an error and the buffer will be\n marked as invalid for future operations, invaliding the contents.</p>\n" |
| 1442 | + }, |
| 1443 | + { |
| 1444 | + "cFunctionName": "git_buf_set", |
| 1445 | + "ignore": false, |
| 1446 | + "description": "<p>Set buffer to a copy of some raw data.</p>\n", |
| 1447 | + "cppFunctionName": "Set", |
| 1448 | + "jsFunctionName": "set", |
| 1449 | + "return": { |
| 1450 | + "cType": "int", |
| 1451 | + "comment": " 0 on success, -1 on allocation failure", |
| 1452 | + "cppClassName": "Number", |
| 1453 | + "jsClassName": "Number", |
| 1454 | + "isErrorCode": true |
| 1455 | + }, |
| 1456 | + "isConstructorMethod": false, |
| 1457 | + "isPrototypeMethod": true, |
| 1458 | + "args": [ |
| 1459 | + { |
| 1460 | + "name": "buffer", |
| 1461 | + "cType": "git_buf *", |
| 1462 | + "cppClassName": "GitBuf", |
| 1463 | + "jsClassName": "Buf", |
| 1464 | + "comment": "The buffer to set", |
| 1465 | + "isReturn": true, |
| 1466 | + "isSelf": false, |
| 1467 | + "shouldAlloc": true |
| 1468 | + }, |
| 1469 | + { |
| 1470 | + "name": "data", |
| 1471 | + "cType": "const void *", |
| 1472 | + "cppClassName": "Buffer", |
| 1473 | + "jsClassName": "Buffer", |
| 1474 | + "comment": "The data to copy into the buffer", |
| 1475 | + "isReturn": false, |
| 1476 | + "isSelf": false, |
| 1477 | + "shouldAlloc": false |
| 1478 | + }, |
| 1479 | + { |
| 1480 | + "name": "datalen", |
| 1481 | + "cType": "size_t", |
| 1482 | + "cppClassName": "Uint32", |
| 1483 | + "jsClassName": "Number", |
| 1484 | + "comment": "The length of the data to copy into the buffer", |
| 1485 | + "isReturn": false, |
| 1486 | + "isSelf": false, |
| 1487 | + "shouldAlloc": false |
| 1488 | + } |
| 1489 | + ], |
| 1490 | + "isAsync": true, |
| 1491 | + "comment": "" |
| 1492 | + } |
| 1493 | + ], |
| 1494 | + "filename": "buf.h", |
| 1495 | + "ignore": false, |
| 1496 | + "cppClassName": "GitBuf", |
| 1497 | + "jsClassName": "Buf", |
1376 | 1498 | "description": " A data buffer for exporting data from libgit2", |
1377 | | - "dependencies": [], |
1378 | | - "fields": [], |
1379 | | - "functions": [] |
| 1499 | + "freeFunctionName": "git_buf_free", |
| 1500 | + "hasConstructor": false, |
| 1501 | + "dependencies": [ |
| 1502 | + "../include/buf.h" |
| 1503 | + ], |
| 1504 | + "fields": [ |
| 1505 | + { |
| 1506 | + "type": "char *", |
| 1507 | + "name": "ptr", |
| 1508 | + "comments": "", |
| 1509 | + "cType": "char *", |
| 1510 | + "cppFunctionName": "Ptr", |
| 1511 | + "jsFunctionName": "ptr", |
| 1512 | + "cppClassName": "String", |
| 1513 | + "jsClassName": "String" |
| 1514 | + }, |
| 1515 | + { |
| 1516 | + "type": "size_t", |
| 1517 | + "name": "asize", |
| 1518 | + "comments": "", |
| 1519 | + "cType": "size_t", |
| 1520 | + "cppFunctionName": "Asize", |
| 1521 | + "jsFunctionName": "asize", |
| 1522 | + "cppClassName": "Uint32", |
| 1523 | + "jsClassName": "Number" |
| 1524 | + }, |
| 1525 | + { |
| 1526 | + "type": "size_t", |
| 1527 | + "name": "size", |
| 1528 | + "comments": "", |
| 1529 | + "cType": "size_t", |
| 1530 | + "cppFunctionName": "Size", |
| 1531 | + "jsFunctionName": "size", |
| 1532 | + "cppClassName": "Uint32", |
| 1533 | + "jsClassName": "Number" |
| 1534 | + } |
| 1535 | + ] |
1380 | 1536 | }, |
1381 | 1537 | { |
1382 | 1538 | "cType": null, |
|
2295 | 2451 | "freeFunctionName": "git_config_free", |
2296 | 2452 | "hasConstructor": false, |
2297 | 2453 | "dependencies": [ |
| 2454 | + "../include/buf.h", |
2298 | 2455 | "../include/config.h" |
2299 | 2456 | ], |
2300 | 2457 | "fields": [], |
|
2409 | 2566 | "../include/repository.h", |
2410 | 2567 | "../include/tree.h", |
2411 | 2568 | "../include/index.h", |
| 2569 | + "../include/buf.h", |
2412 | 2570 | "../include/commit.h" |
2413 | 2571 | ], |
2414 | 2572 | "functions": [ |
|
2812 | 2970 | "hasConstructor": false, |
2813 | 2971 | "dependencies": [ |
2814 | 2972 | "../include/repository.h", |
2815 | | - "../include/blob.h" |
| 2973 | + "../include/blob.h", |
| 2974 | + "../include/buf.h" |
2816 | 2975 | ], |
2817 | 2976 | "functions": [] |
2818 | 2977 | }, |
|
2904 | 3063 | "ignore": false, |
2905 | 3064 | "cppClassName": "GitMessage", |
2906 | 3065 | "jsClassName": "Message", |
2907 | | - "dependencies": [], |
| 3066 | + "dependencies": [ |
| 3067 | + "../include/buf.h" |
| 3068 | + ], |
2908 | 3069 | "fields": [], |
2909 | 3070 | "functions": [] |
2910 | 3071 | }, |
|
2943 | 3104 | "hasConstructor": false, |
2944 | 3105 | "dependencies": [ |
2945 | 3106 | "../include/object.h", |
2946 | | - "../include/repository.h" |
| 3107 | + "../include/repository.h", |
| 3108 | + "../include/buf.h" |
2947 | 3109 | ], |
2948 | 3110 | "fields": [], |
2949 | 3111 | "functions": [] |
|
3501 | 3663 | "jsClassName": "Refspec", |
3502 | 3664 | "cType": "git_refspec", |
3503 | 3665 | "description": "", |
3504 | | - "dependencies": [], |
| 3666 | + "dependencies": [ |
| 3667 | + "../include/buf.h" |
| 3668 | + ], |
3505 | 3669 | "fields": [], |
3506 | 3670 | "functions": [] |
3507 | 3671 | }, |
|
3516 | 3680 | "../include/repository.h", |
3517 | 3681 | "../include/strarray.h", |
3518 | 3682 | "../include/transport.h", |
3519 | | - "../include/remote_callbacks.h" |
| 3683 | + "../include/remote_callbacks.h", |
| 3684 | + "../include/buf.h" |
3520 | 3685 | ], |
3521 | 3686 | "functions": [ |
3522 | 3687 | { |
|
3872 | 4037 | "../include/repository_init_options.h", |
3873 | 4038 | "../include/repository.h", |
3874 | 4039 | "../include/odb.h", |
| 4040 | + "../include/buf.h", |
3875 | 4041 | "../include/repository_init_options.h", |
3876 | 4042 | "../include/config.h", |
3877 | 4043 | "../include/refdb.h", |
|
0 commit comments