diff options
| author | amelia squires <[email protected]> | 2024-09-08 05:13:11 -0500 |
|---|---|---|
| committer | amelia squires <[email protected]> | 2024-09-08 05:13:11 -0500 |
| commit | eda53f915dc319cec7a4fe680734db87a113fe5e (patch) | |
| tree | 57368ce9ae49e89809171dc6ae85fde936a2b5f2 /src/types/parray.c | |
| parent | 4523c0c2ae946e1e5c982a01c961d3aaacd7858a (diff) | |
| parent | 86fbbbc48b76436cddd08b04bd0d751c6e51d29f (diff) | |
merge rewrite-net-route-matching
Diffstat (limited to 'src/types/parray.c')
| -rw-r--r-- | src/types/parray.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/types/parray.c b/src/types/parray.c index a1109c5..b1e41a2 100644 --- a/src/types/parray.c +++ b/src/types/parray.c @@ -31,6 +31,13 @@ parray_t* parray_init(){ return awa;
}
+parray_t* parray_initl(int len){
+ parray_t* awa = malloc(sizeof * awa);
+ awa->P = malloc(sizeof * awa->P * len);
+ awa->len = len;
+ return awa;
+}
+
/**
* @brief sets value at key to value, adds a new index if new
*
|
