Skip to content

Commit

Permalink
src: make Object::GetPropertyNames() const
Browse files Browse the repository at this point in the history
Fixes: nodejs/node-addon-api#380
PR-URL: nodejs/node-addon-api#415
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • Loading branch information
wroy7860 committed Jan 2, 2019
1 parent e231356 commit 224f1c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion napi-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ inline bool Object::Delete(uint32_t index) {
return result;
}

inline Array Object::GetPropertyNames() {
inline Array Object::GetPropertyNames() const {
napi_value result;
napi_status status = napi_get_property_names(_env, _value, &result);
NAPI_THROW_IF_FAILED(_env, status, Array());
Expand Down
2 changes: 1 addition & 1 deletion napi.h
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ namespace Napi {
uint32_t index ///< Property / element index
);

Array GetPropertyNames(); ///< Get all property names
Array GetPropertyNames() const; ///< Get all property names

/// Defines a property on the object.
void DefineProperty(
Expand Down

0 comments on commit 224f1c6

Please sign in to comment.