Skip to content

Commit 020ac4a

Browse files
DaAitchmhdawson
authored andcommitted
src: make Object::GetPropertyNames() const
Fixes: #380 PR-URL: #415 Reviewed-By: Gabriel Schulhof <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 91eaa6f commit 020ac4a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

napi-inl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ inline bool Object::Delete(uint32_t index) {
10781078
return result;
10791079
}
10801080

1081-
inline Array Object::GetPropertyNames() {
1081+
inline Array Object::GetPropertyNames() const {
10821082
napi_value result;
10831083
napi_status status = napi_get_property_names(_env, _value, &result);
10841084
NAPI_THROW_IF_FAILED(_env, status, Array());

napi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ namespace Napi {
601601
uint32_t index ///< Property / element index
602602
);
603603

604-
Array GetPropertyNames(); ///< Get all property names
604+
Array GetPropertyNames() const; ///< Get all property names
605605

606606
/// Defines a property on the object.
607607
void DefineProperty(

0 commit comments

Comments
 (0)