[gjs: 10/21] maint: Remove G_BEGIN_DECLS and G_END_DECLS from internal files
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 10/21] maint: Remove G_BEGIN_DECLS and G_END_DECLS from internal files
- Date: Sun, 9 Jun 2019 17:03:00 +0000 (UTC)
commit a759d514260a1c65f10c64af9bdef85acf49a2fa
Author: Philip Chimento <philip chimento gmail com>
Date: Fri May 31 23:24:22 2019 -0700
maint: Remove G_BEGIN_DECLS and G_END_DECLS from internal files
Any C++ header files that are internal to GJS that don't need to be
introspected, don't have to use G_BEGIN_DECLS and G_END_DECLS. It
doesn't matter whether their symbols are mangled or not.
gi/arg.h | 4 ----
gi/closure.h | 4 ----
gi/enumeration.h | 4 ----
gi/function.h | 4 ----
gi/gerror.h | 4 ----
gi/gtype.h | 4 ----
gi/interface.h | 4 ----
gi/ns.h | 4 ----
gi/object.h | 4 ----
gi/param.h | 4 ----
gi/repo.h | 4 ----
gi/union.h | 4 ----
gi/value.h | 4 ----
gi/wrapperutils.h | 4 ----
gjs/byteArray.h | 4 ----
gjs/global.h | 4 ----
gjs/importer.h | 4 ----
gjs/jsapi-class.h | 4 ----
gjs/jsapi-util.h | 4 ----
gjs/module.h | 4 ----
gjs/native.h | 4 ----
gjs/profiler-private.h | 4 ----
modules/console.h | 4 ----
modules/modules.h | 4 ----
modules/system.h | 4 ----
util/glib.h | 4 ----
util/log.h | 4 ----
util/misc.h | 4 ----
28 files changed, 112 deletions(-)
---
diff --git a/gi/arg.h b/gi/arg.h
index c35ee419..7e7077d4 100644
--- a/gi/arg.h
+++ b/gi/arg.h
@@ -32,8 +32,6 @@
#include <girepository.h>
-G_BEGIN_DECLS
-
// Different roles for a GIArgument; currently used only in exception and debug
// messages.
typedef enum {
@@ -123,6 +121,4 @@ bool gjs_array_to_strv (JSContext *context,
unsigned int length,
void **arr_p);
-G_END_DECLS
-
#endif // GI_ARG_H_
diff --git a/gi/closure.h b/gi/closure.h
index c7410ab4..ef85c05f 100644
--- a/gi/closure.h
+++ b/gi/closure.h
@@ -30,8 +30,6 @@
#include "gjs/jsapi-util.h"
#include "gjs/macros.h"
-G_BEGIN_DECLS
-
GJS_USE
GClosure* gjs_closure_new(JSContext* cx, JSFunction* callable,
const char* description, bool root_function);
@@ -53,6 +51,4 @@ JSFunction* gjs_closure_get_callable(GClosure* closure);
void gjs_closure_trace (GClosure *closure,
JSTracer *tracer);
-G_END_DECLS
-
#endif // GI_CLOSURE_H_
diff --git a/gi/enumeration.h b/gi/enumeration.h
index d9a9e8f4..ac78a974 100644
--- a/gi/enumeration.h
+++ b/gi/enumeration.h
@@ -32,8 +32,6 @@
#include <girepository.h>
-G_BEGIN_DECLS
-
GJS_JSAPI_RETURN_CONVENTION
bool gjs_define_enum_values(JSContext *context,
JS::HandleObject in_object,
@@ -44,6 +42,4 @@ bool gjs_define_enumeration(JSContext *context,
JS::HandleObject in_object,
GIEnumInfo *info);
-G_END_DECLS
-
#endif // GI_ENUMERATION_H_
diff --git a/gi/function.h b/gi/function.h
index 3b593f2f..d9bc3d69 100644
--- a/gi/function.h
+++ b/gi/function.h
@@ -33,8 +33,6 @@
#include <girepository.h>
#include <girffi.h>
-G_BEGIN_DECLS
-
typedef enum {
PARAM_NORMAL,
PARAM_SKIPPED,
@@ -84,6 +82,4 @@ bool gjs_invoke_constructor_from_c(JSContext *context,
const JS::HandleValueArray& args,
GIArgument *rvalue);
-G_END_DECLS
-
#endif // GI_FUNCTION_H_
diff --git a/gi/gerror.h b/gi/gerror.h
index ea11aab5..5cd08b5b 100644
--- a/gi/gerror.h
+++ b/gi/gerror.h
@@ -168,8 +168,6 @@ class ErrorInstance : public GIWrapperInstance<ErrorBase, ErrorPrototype,
static JSObject* object_for_c_ptr(JSContext* cx, GError* gerror);
};
-G_BEGIN_DECLS
-
GJS_JSAPI_RETURN_CONVENTION
GError *gjs_gerror_make_from_error(JSContext *cx,
JS::HandleObject obj);
@@ -179,6 +177,4 @@ bool gjs_define_error_properties(JSContext* cx, JS::HandleObject obj);
bool gjs_throw_gerror(JSContext* cx, GError* error);
-G_END_DECLS
-
#endif // GI_GERROR_H_
diff --git a/gi/gtype.h b/gi/gtype.h
index 867fd34d..9a32dbf3 100644
--- a/gi/gtype.h
+++ b/gi/gtype.h
@@ -32,8 +32,6 @@
#include "gjs/jsapi-wrapper.h"
#include "gjs/macros.h"
-G_BEGIN_DECLS
-
GJS_JSAPI_RETURN_CONVENTION
JSObject * gjs_gtype_create_gtype_wrapper (JSContext *context,
GType gtype);
@@ -47,6 +45,4 @@ bool gjs_typecheck_gtype (JSContext *context,
JS::HandleObject obj,
bool throw_error);
-G_END_DECLS
-
#endif // GI_GTYPE_H_
diff --git a/gi/interface.h b/gi/interface.h
index f108e7de..7730b4a0 100644
--- a/gi/interface.h
+++ b/gi/interface.h
@@ -125,13 +125,9 @@ class InterfaceInstance
G_GNUC_NORETURN ~InterfaceInstance(void) { g_assert_not_reached(); }
};
-G_BEGIN_DECLS
-
GJS_JSAPI_RETURN_CONVENTION
bool gjs_lookup_interface_constructor(JSContext *context,
GType gtype,
JS::MutableHandleValue value_p);
-G_END_DECLS
-
#endif // GI_INTERFACE_H_
diff --git a/gi/ns.h b/gi/ns.h
index 8245018e..3d5fa7b9 100644
--- a/gi/ns.h
+++ b/gi/ns.h
@@ -30,12 +30,8 @@
#include "gjs/jsapi-util.h"
#include "gjs/macros.h"
-G_BEGIN_DECLS
-
GJS_JSAPI_RETURN_CONVENTION
JSObject* gjs_create_ns(JSContext *context,
const char *ns_name);
-G_END_DECLS
-
#endif // GI_NS_H_
diff --git a/gi/object.h b/gi/object.h
index 2225ab78..27272f6e 100644
--- a/gi/object.h
+++ b/gi/object.h
@@ -448,8 +448,6 @@ class ObjectInstance : public GIWrapperInstance<ObjectBase, ObjectPrototype,
GObject* where_the_object_was);
};
-G_BEGIN_DECLS
-
GJS_JSAPI_RETURN_CONVENTION
bool gjs_lookup_object_constructor(JSContext *context,
GType gtype,
@@ -462,6 +460,4 @@ JSObject* gjs_lookup_object_constructor_from_info(JSContext* cx,
void gjs_object_clear_toggles(void);
void gjs_object_shutdown_toggle_queue(void);
-G_END_DECLS
-
#endif // GI_OBJECT_H_
diff --git a/gi/param.h b/gi/param.h
index 32a04a72..751b1e4b 100644
--- a/gi/param.h
+++ b/gi/param.h
@@ -31,8 +31,6 @@
#include "gjs/jsapi-util.h"
#include "gjs/macros.h"
-G_BEGIN_DECLS
-
GJS_JSAPI_RETURN_CONVENTION
bool gjs_define_param_class(JSContext *context,
JS::HandleObject in_object);
@@ -51,6 +49,4 @@ bool gjs_typecheck_param(JSContext *context,
GType expected_type,
bool throw_error);
-G_END_DECLS
-
#endif // GI_PARAM_H_
diff --git a/gi/repo.h b/gi/repo.h
index 0e26c7a6..20221f0c 100644
--- a/gi/repo.h
+++ b/gi/repo.h
@@ -33,8 +33,6 @@
#include "gjs/jsapi-wrapper.h"
#include "gjs/macros.h"
-G_BEGIN_DECLS
-
GJS_JSAPI_RETURN_CONVENTION
bool gjs_define_repo(JSContext *cx,
JS::MutableHandleObject repo);
@@ -75,6 +73,4 @@ char* gjs_hyphen_from_camel (const char *camel_name);
void _gjs_log_info_usage(GIBaseInfo *info);
#endif
-G_END_DECLS
-
#endif // GI_REPO_H_
diff --git a/gi/union.h b/gi/union.h
index 58769691..f9078fcc 100644
--- a/gi/union.h
+++ b/gi/union.h
@@ -97,8 +97,6 @@ class UnionInstance
static void* copy_ptr(JSContext* cx, GType gtype, void* ptr);
};
-G_BEGIN_DECLS
-
GJS_JSAPI_RETURN_CONVENTION
bool gjs_define_union_class(JSContext *context,
JS::HandleObject in_object,
@@ -109,6 +107,4 @@ JSObject* gjs_union_from_c_union (JSContext *context,
GIUnionInfo *info,
void *gboxed);
-G_END_DECLS
-
#endif // GI_UNION_H_
diff --git a/gi/value.h b/gi/value.h
index 2343e42a..dab779a2 100644
--- a/gi/value.h
+++ b/gi/value.h
@@ -30,8 +30,6 @@
#include "gjs/jsapi-util.h"
#include "gjs/macros.h"
-G_BEGIN_DECLS
-
GJS_JSAPI_RETURN_CONVENTION
bool gjs_value_to_g_value (JSContext *context,
JS::HandleValue value,
@@ -54,6 +52,4 @@ GClosure* gjs_closure_new_for_signal(JSContext* cx, JSFunction* callable,
const char* description,
unsigned signal_id);
-G_END_DECLS
-
#endif // GI_VALUE_H_
diff --git a/gi/wrapperutils.h b/gi/wrapperutils.h
index 7eff199e..80d71459 100644
--- a/gi/wrapperutils.h
+++ b/gi/wrapperutils.h
@@ -31,8 +31,6 @@
#include "gjs/macros.h"
#include "util/log.h"
-G_BEGIN_DECLS
-
GJS_JSAPI_RETURN_CONVENTION
bool gjs_wrapper_to_string_func(JSContext* cx, JSObject* this_obj,
const char* objtype, GIBaseInfo* info,
@@ -49,8 +47,6 @@ GJS_JSAPI_RETURN_CONVENTION
bool gjs_wrapper_define_gtype_prop(JSContext* cx, JS::HandleObject constructor,
GType gtype);
-G_END_DECLS
-
namespace InfoType {
enum Tag { Enum, Interface, Object, Struct, Union };
}
diff --git a/gjs/byteArray.h b/gjs/byteArray.h
index 6d0ea2cc..714bc7bc 100644
--- a/gjs/byteArray.h
+++ b/gjs/byteArray.h
@@ -30,8 +30,6 @@
#include "gjs/jsapi-util.h"
#include "gjs/macros.h"
-G_BEGIN_DECLS
-
GJS_JSAPI_RETURN_CONVENTION
bool gjs_define_byte_array_stuff(JSContext *context,
JS::MutableHandleObject module);
@@ -49,6 +47,4 @@ GByteArray* gjs_byte_array_get_byte_array(JS::HandleObject obj);
GJS_USE
GBytes* gjs_byte_array_get_bytes(JS::HandleObject obj);
-G_END_DECLS
-
#endif // GJS_BYTEARRAY_H_
diff --git a/gjs/global.h b/gjs/global.h
index ef3be6c3..882f6bd4 100644
--- a/gjs/global.h
+++ b/gjs/global.h
@@ -29,8 +29,6 @@
#include "gjs/macros.h"
#include "jsapi-wrapper.h"
-G_BEGIN_DECLS
-
typedef enum {
GJS_GLOBAL_SLOT_IMPORTS,
GJS_GLOBAL_SLOT_PROTOTYPE_gtype,
@@ -68,8 +66,6 @@ void gjs_set_global_slot(JSContext *context,
GjsGlobalSlot slot,
JS::Value value);
-G_END_DECLS
-
JS::Value gjs_get_global_slot(JSContext* cx, GjsGlobalSlot slot);
#endif // GJS_GLOBAL_H_
diff --git a/gjs/importer.h b/gjs/importer.h
index 359c822a..4a8ec1d4 100644
--- a/gjs/importer.h
+++ b/gjs/importer.h
@@ -30,8 +30,6 @@
#include "gjs/jsapi-util.h"
#include "gjs/macros.h"
-G_BEGIN_DECLS
-
GJS_JSAPI_RETURN_CONVENTION
JSObject *gjs_create_root_importer(JSContext *cx,
const char * const *search_path);
@@ -41,6 +39,4 @@ bool gjs_import_native_module(JSContext *cx,
JS::HandleObject importer,
const char *name);
-G_END_DECLS
-
#endif // GJS_IMPORTER_H_
diff --git a/gjs/jsapi-class.h b/gjs/jsapi-class.h
index 90767731..3a628972 100644
--- a/gjs/jsapi-class.h
+++ b/gjs/jsapi-class.h
@@ -31,8 +31,6 @@
#include "jsapi-wrapper.h"
#include "util/log.h"
-G_BEGIN_DECLS
-
GJS_JSAPI_RETURN_CONVENTION
bool gjs_init_class_dynamic(
JSContext* cx, JS::HandleObject in_object, JS::HandleObject parent_proto,
@@ -321,8 +319,6 @@ GJS_DEFINE_PROTO_FUNCS_WITH_PARENT(cname, no_parent)
return false; \
}
-G_END_DECLS
-
GJS_USE
JS::Value gjs_dynamic_property_private_slot(JSObject *accessor_obj);
diff --git a/gjs/jsapi-util.h b/gjs/jsapi-util.h
index f0d9a3f0..8ee1874b 100644
--- a/gjs/jsapi-util.h
+++ b/gjs/jsapi-util.h
@@ -165,8 +165,6 @@ template <>
struct GCPolicy<GjsAutoParam> : public IgnoreGCPolicy<GjsAutoParam> {};
} // namespace JS
-G_BEGIN_DECLS
-
/* Flags that should be set on properties exported from native code modules.
* Basically set these on API, but do NOT set them on data.
*
@@ -292,8 +290,6 @@ bool gjs_unichar_from_string (JSContext *context,
void gjs_maybe_gc (JSContext *context);
void gjs_gc_if_needed(JSContext *cx);
-G_END_DECLS
-
GJS_USE
size_t gjs_unix_shebang_len(const std::u16string& script,
unsigned* start_line_number);
diff --git a/gjs/module.h b/gjs/module.h
index 06dd7dea..717685ca 100644
--- a/gjs/module.h
+++ b/gjs/module.h
@@ -29,8 +29,6 @@
#include "gjs/macros.h"
#include "jsapi-wrapper.h"
-G_BEGIN_DECLS
-
GJS_JSAPI_RETURN_CONVENTION
JSObject *
gjs_module_import(JSContext *cx,
@@ -39,6 +37,4 @@ gjs_module_import(JSContext *cx,
const char *name,
GFile *file);
-G_END_DECLS
-
#endif // GJS_MODULE_H_
diff --git a/gjs/native.h b/gjs/native.h
index 72b675f0..0d2f2b1a 100644
--- a/gjs/native.h
+++ b/gjs/native.h
@@ -30,8 +30,6 @@
#include "gjs/jsapi-util.h"
#include "gjs/macros.h"
-G_BEGIN_DECLS
-
typedef bool (* GjsDefineModuleFunc) (JSContext *context,
JS::MutableHandleObject module_out);
@@ -49,6 +47,4 @@ bool gjs_load_native_module(JSContext *cx,
const char *name,
JS::MutableHandleObject module_out);
-G_END_DECLS
-
#endif // GJS_NATIVE_H_
diff --git a/gjs/profiler-private.h b/gjs/profiler-private.h
index d2c1d424..e9a3b914 100644
--- a/gjs/profiler-private.h
+++ b/gjs/profiler-private.h
@@ -30,8 +30,6 @@
#include "gjs/macros.h"
#include "profiler.h"
-G_BEGIN_DECLS
-
GjsProfiler *_gjs_profiler_new(GjsContext *context);
void _gjs_profiler_free(GjsProfiler *self);
@@ -44,6 +42,4 @@ bool _gjs_profiler_is_running(GjsProfiler *self);
void _gjs_profiler_setup_signals(GjsProfiler *self, GjsContext *context);
-G_END_DECLS
-
#endif // GJS_PROFILER_PRIVATE_H_
diff --git a/modules/console.h b/modules/console.h
index 364577b9..7232566a 100644
--- a/modules/console.h
+++ b/modules/console.h
@@ -30,12 +30,8 @@
#include "gjs/jsapi-util.h"
#include "gjs/macros.h"
-G_BEGIN_DECLS
-
GJS_JSAPI_RETURN_CONVENTION
bool gjs_define_console_stuff(JSContext *context,
JS::MutableHandleObject module);
-G_END_DECLS
-
#endif // MODULES_CONSOLE_H_
diff --git a/modules/modules.h b/modules/modules.h
index 18dfbc89..2922113e 100644
--- a/modules/modules.h
+++ b/modules/modules.h
@@ -28,10 +28,6 @@
#include <glib.h>
#include "gjs/jsapi-util.h"
-G_BEGIN_DECLS
-
void gjs_register_static_modules (void);
-G_END_DECLS
-
#endif // MODULES_MODULES_H_
diff --git a/modules/system.h b/modules/system.h
index ff8cdb78..30e365d4 100644
--- a/modules/system.h
+++ b/modules/system.h
@@ -31,12 +31,8 @@
#include "gjs/jsapi-util.h"
#include "gjs/macros.h"
-G_BEGIN_DECLS
-
GJS_JSAPI_RETURN_CONVENTION
bool gjs_js_define_system_stuff(JSContext *context,
JS::MutableHandleObject module);
-G_END_DECLS
-
#endif // MODULES_SYSTEM_H_
diff --git a/util/glib.h b/util/glib.h
index 7ad642ce..06bc6822 100644
--- a/util/glib.h
+++ b/util/glib.h
@@ -26,11 +26,7 @@
#include <glib.h>
-G_BEGIN_DECLS
-
char** gjs_g_strv_concat (char ***strv_array,
int len);
-G_END_DECLS
-
#endif // UTIL_GLIB_H_
diff --git a/util/log.h b/util/log.h
index fa4def51..feb49e05 100644
--- a/util/log.h
+++ b/util/log.h
@@ -26,8 +26,6 @@
#include <glib.h>
-G_BEGIN_DECLS
-
/* The idea of this is to be able to have one big log file for the entire
* environment, and grep out what you care about. So each module or app
* should have its own entry in the enum. Be sure to add new enum entries
@@ -172,6 +170,4 @@ void gjs_debug(GjsDebugTopic topic,
const char *format,
...) G_GNUC_PRINTF (2, 3);
-G_END_DECLS
-
#endif // UTIL_LOG_H_
diff --git a/util/misc.h b/util/misc.h
index a94ace46..87c99cec 100644
--- a/util/misc.h
+++ b/util/misc.h
@@ -26,10 +26,6 @@
#include <glib.h>
-G_BEGIN_DECLS
-
bool gjs_environment_variable_is_set (const char *env_variable_name);
-G_END_DECLS
-
#endif // UTIL_MISC_H_
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]