Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify when input pointers can be NULL #252

Closed
RReverser opened this issue Jun 11, 2017 · 4 comments
Closed

Specify when input pointers can be NULL #252

RReverser opened this issue Jun 11, 2017 · 4 comments
Assignees

Comments

@RReverser
Copy link
Member

For example, apparently (according to examples) it’s ok to pass NULL as thisArg and data to napi_get_cb_info if you don’t want to retrieve it, but this is not mentioned in the docs.

Some other places like napi_wrap mention “optional” explicitly for out params, might be a good idea to go through other functions too and explicitly specify when pointer is "optional" or when it must be non-NULL.

@sampsongao sampsongao self-assigned this Aug 17, 2017
@RReverser
Copy link
Member Author

@sampsongao Are you still planning to do this?

@sampsongao
Copy link
Collaborator

I am busy with my assignment for school now. I will continue on this maybe next week or so.

@mhdawson
Copy link
Member

Submitted - nodejs/node#40821 for reported instance.
Leaving open as we should look for other cases where we can add the optional info.

mhdawson added a commit to mhdawson/io.js that referenced this issue Nov 19, 2021
Refs: nodejs/abi-stable-node#252

Signed-off-by: Michael Dawson <mdawson@devrus.com>
mhdawson added a commit to nodejs/node that referenced this issue Nov 22, 2021
Refs: nodejs/abi-stable-node#252

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: #40888
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
targos pushed a commit to nodejs/node that referenced this issue Nov 26, 2021
Refs: nodejs/abi-stable-node#252

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: #40888
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
mhdawson added a commit to mhdawson/io.js that referenced this issue Nov 29, 2021
Fixes: nodejs/abi-stable-node#252

I've been through the Node-api methods and I believe
this is the last places where optional parameters
were not documented.

Signed-off-by: Michael Dawson <mdawson@devrus.com>
@mhdawson
Copy link
Member

Submitted nodejs/node#41021 to close out the remaining places that needed an update.

danielleadams pushed a commit to nodejs/node that referenced this issue Dec 13, 2021
Fixes: nodejs/abi-stable-node#252

I've been through the Node-api methods and I believe
this is the last places where optional parameters
were not documented.

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: #41021
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
danielleadams pushed a commit to nodejs/node that referenced this issue Dec 14, 2021
Fixes: nodejs/abi-stable-node#252

I've been through the Node-api methods and I believe
this is the last places where optional parameters
were not documented.

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: #41021
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
danielleadams pushed a commit to nodejs/node that referenced this issue Jan 30, 2022
Refs: nodejs/abi-stable-node#252

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: #40888
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
danielleadams pushed a commit to nodejs/node that referenced this issue Jan 31, 2022
Fixes: nodejs/abi-stable-node#252

I've been through the Node-api methods and I believe
this is the last places where optional parameters
were not documented.

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: #41021
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
danielleadams pushed a commit to nodejs/node that referenced this issue Jan 31, 2022
Fixes: nodejs/abi-stable-node#252

I've been through the Node-api methods and I believe
this is the last places where optional parameters
were not documented.

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: #41021
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Linkgoron pushed a commit to Linkgoron/node that referenced this issue Jan 31, 2022
Fixes: nodejs/abi-stable-node#252

I've been through the Node-api methods and I believe
this is the last places where optional parameters
were not documented.

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: nodejs#41021
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
danielleadams pushed a commit to nodejs/node that referenced this issue Feb 1, 2022
Refs: nodejs/abi-stable-node#252

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: #40888
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
danielleadams pushed a commit to nodejs/node that referenced this issue Feb 1, 2022
Fixes: nodejs/abi-stable-node#252

I've been through the Node-api methods and I believe
this is the last places where optional parameters
were not documented.

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: #41021
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants