[gjs: 13/15] wrapperutils: Make native address const
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 13/15] wrapperutils: Make native address const
- Date: Mon, 24 Dec 2018 00:42:46 +0000 (UTC)
commit da015034a455fcbc753bc76dd92013aca2f6058d
Author: Philip Chimento <philip chimento gmail com>
Date: Fri Dec 21 10:52:14 2018 -0700
wrapperutils: Make native address const
Only the pointer's address is used, so it can be const.
gi/wrapperutils.cpp | 2 +-
gi/wrapperutils.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gi/wrapperutils.cpp b/gi/wrapperutils.cpp
index 29e800de..3814c40a 100644
--- a/gi/wrapperutils.cpp
+++ b/gi/wrapperutils.cpp
@@ -34,7 +34,7 @@
*/
bool gjs_wrapper_to_string_func(JSContext* context, JSObject* this_obj,
const char* objtype, GIBaseInfo* info,
- GType gtype, void* native_address,
+ GType gtype, const void* native_address,
JS::MutableHandleValue rval) {
GString *buf;
bool ret = false;
diff --git a/gi/wrapperutils.h b/gi/wrapperutils.h
index bddb8436..321db128 100644
--- a/gi/wrapperutils.h
+++ b/gi/wrapperutils.h
@@ -33,7 +33,7 @@ G_BEGIN_DECLS
GJS_JSAPI_RETURN_CONVENTION
bool gjs_wrapper_to_string_func(JSContext* cx, JSObject* this_obj,
const char* objtype, GIBaseInfo* info,
- GType gtype, void* native_address,
+ GType gtype, const void* native_address,
JS::MutableHandleValue ret);
bool gjs_wrapper_throw_nonexistent_field(JSContext* cx, GType gtype,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]