Skip to content

Commit

Permalink
feat: add C implementation for constants/int32/max
Browse files Browse the repository at this point in the history
PR-URL: 	stdlib-js#1683
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com> 
Signed-off-by: Athan Reines <kgryte@gmail.com>
  • Loading branch information
2 people authored and Utkarsh Gupta committed Mar 7, 2024
1 parent 63e4370 commit 3a0c7dd
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 0 deletions.
54 changes: 54 additions & 0 deletions lib/node_modules/@stdlib/constants/int32/max/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,60 @@ console.log( INT32_MAX );

<!-- /.examples -->

<!-- C interface documentation. -->

* * *

<section class="c">

## C APIs

<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->

<section class="intro">

</section>

<!-- /.intro -->

<!-- C usage documentation. -->

<section class="usage">

### Usage

```c
#include "stdlib/constants/int32/max.h"
```

#### STDLIB_CONSTANT_INT32_MAX

Macro for the maximum [signed 32-bit integer][max-int32].

</section>

<!-- /.usage -->

<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="notes">

</section>

<!-- /.notes -->

<!-- C API usage examples. -->

<section class="examples">

</section>

<!-- /.examples -->

</section>

<!-- /.c -->

<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->

<section class="related">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef STDLIB_CONSTANTS_INT32_MAX_H
#define STDLIB_CONSTANTS_INT32_MAX_H

/**
* Macro for the maximum signed 32-bit integer.
*/
#define STDLIB_CONSTANT_INT32_MAX 2147483647

#endif // !STDLIB_CONSTANTS_INT32_MAX_H
36 changes: 36 additions & 0 deletions lib/node_modules/@stdlib/constants/int32/max/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"options": {},
"fields": [
{
"field": "src",
"resolve": true,
"relative": true
},
{
"field": "include",
"resolve": true,
"relative": true
},
{
"field": "libraries",
"resolve": false,
"relative": false
},
{
"field": "libpath",
"resolve": true,
"relative": false
}
],
"confs": [
{
"src": [],
"include": [
"./include"
],
"libraries": [],
"libpath": [],
"dependencies": []
}
]
}

0 comments on commit 3a0c7dd

Please sign in to comment.