Commit 0b9ad768 authored by Philip Chimento's avatar Philip Chimento Committed by Philip Chimento

gi: Cleanup gjs_define_gi_stuff()

This function was identical to gjs_define_repo(), so we can remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=777205
parent d4d83e98
......@@ -80,8 +80,6 @@ libgjs_la_SOURCES = \
gjs/context.cpp \
gjs/context-private.h \
gjs/importer.cpp \
gjs/gi.h \
gjs/gi.cpp \
gjs/coverage-internal.h \
gjs/coverage.cpp \
gjs/jsapi-constructor-proxy.cpp \
......
......@@ -28,7 +28,6 @@
#include <string.h>
#include <vector>
#include "gjs/gi.h"
#include "object.h"
#include "gtype.h"
#include "interface.h"
......
......@@ -63,6 +63,9 @@ void gjs_object_define_static_methods(JSContext *context,
GType gtype,
GIObjectInfo *object_info);
bool gjs_define_private_gi_stuff(JSContext *cx,
JS::MutableHandleObject module);
G_END_DECLS
#endif /* __GJS_OBJECT_H__ */
......@@ -24,7 +24,6 @@
#ifndef __GJS_PROXYUTILS_H__
#define __GJS_PROXYUTILS_H__
#include "gjs/gi.h"
#include "gjs/jsapi-util.h"
G_BEGIN_DECLS
......
......@@ -311,8 +311,7 @@ repo_new(JSContext *context)
bool
gjs_define_repo(JSContext *cx,
JS::MutableHandleObject repo,
const char *name)
JS::MutableHandleObject repo)
{
repo.set(repo_new(cx));
return true;
......
......@@ -35,8 +35,7 @@
G_BEGIN_DECLS
bool gjs_define_repo(JSContext *cx,
JS::MutableHandleObject repo,
const char *name);
JS::MutableHandleObject repo);
const char* gjs_info_type_name (GIInfoType type);
JSObject* gjs_lookup_private_namespace (JSContext *context);
......
......@@ -36,9 +36,8 @@
#include "native.h"
#include "byteArray.h"
#include "runtime.h"
#include "gi.h"
#include "gi/object.h"
#include "gi/repo.h"
#include <modules/modules.h>
......@@ -373,7 +372,7 @@ gjs_context_class_init(GjsContextClass *klass)
gjs_register_native_module("byteArray", gjs_define_byte_array_stuff);
gjs_register_native_module("_gi", gjs_define_private_gi_stuff);
gjs_register_native_module("gi", gjs_define_gi_stuff);
gjs_register_native_module("gi", gjs_define_repo);
gjs_register_static_modules();
}
......
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
/*
* Copyright (c) 2008 litl, LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
#include "gi.h"
#include <util/misc.h>
#include <string.h>
#include "gjs/native.h"
#include "gjs/jsapi-wrapper.h"
#include "gi/repo.h"
bool
gjs_define_gi_stuff(JSContext *cx,
JS::MutableHandleObject module)
{
return gjs_define_repo(cx, module, "gi");
}
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
/*
* Copyright (c) 2008 litl, LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
#ifndef __GJS_GI_H__
#define __GJS_GI_H__
#include <glib.h>
#include <girepository.h>
#include "gjs/jsapi-util.h"
G_BEGIN_DECLS
bool gjs_define_gi_stuff(JSContext *cx,
JS::MutableHandleObject module);
bool gjs_define_private_gi_stuff(JSContext *cx,
JS::MutableHandleObject module);
G_END_DECLS
#endif /* __GJS_GI_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment