Skip to content

Commit

Permalink
Remove unused JSCore4GTK functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmoinvaz committed Dec 24, 2024
1 parent bf49e37 commit 8681af3
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions execute_jscore4.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,11 @@
#include "util.h"

typedef struct g_proxy_execute_jscore4_s {
// Jscore4GTK module
// JSCore4GTK module
void *module;
// Class functions
JSClassRef (*JSClassCreate)(const JSClassDefinition *class_def);
// Object functions
JSObjectRef (*JSObjectMake)(JSContextRef ctx, JSClassRef cls, void *Data);
JSObjectRef (*JSObjectMakeFunctionWithCallback)(JSContextRef ctx, JSStringRef name,
JSObjectCallAsFunctionCallback callback);
void *(*JSObjectGetPrivate)(JSObjectRef object);
bool (*JSObjectSetPrivate)(JSObjectRef object, void *data);
void (*JSObjectSetProperty)(JSContextRef context, JSObjectRef object, JSStringRef name, JSValueRef value,
JSPropertyAttributes attribs, JSValueRef *exception);
JSValueRef (*JSObjectGetProperty)(JSContextRef ctx, JSObjectRef object, JSStringRef name, JSValueRef *exception);
Expand All @@ -42,8 +37,6 @@ typedef struct g_proxy_execute_jscore4_s {
JSObjectRef (*JSValueToObject)(JSContextRef ctx, JSValueRef value, JSValueRef *exception);
JSStringRef (*JSValueToStringCopy)(JSContextRef ctx, JSValueRef value, JSValueRef *exception);
double (*JSValueToNumber)(JSContextRef ctx, JSValueRef value, JSValueRef *exception);
JSValueRef (*JSValueMakeNull)(JSContextRef ctx);
JSValueRef (*JSValueMakeBoolean)(JSContextRef ctx, bool value);
JSValueRef (*JSValueMakeString)(JSContextRef ctx, JSStringRef str);
// String functions
JSStringRef (*JSStringCreateWithUTF8CString)(const char *str);
Expand Down Expand Up @@ -391,14 +384,7 @@ void proxy_execute_jscore4_delayed_init(void) {
if (!g_proxy_execute_jscore4.module)
return;

Check warning on line 385 in execute_jscore4.c

View check run for this annotation

Codecov / codecov/patch

execute_jscore4.c#L385

Added line #L385 was not covered by tests

// Class functions
g_proxy_execute_jscore4.JSClassCreate = dlsym(g_proxy_execute_jscore4.module, "JSClassCreate");
if (!g_proxy_execute_jscore4.JSClassCreate)
goto jscore4_init_error;
// Object functions
g_proxy_execute_jscore4.JSObjectMake = dlsym(g_proxy_execute_jscore4.module, "JSObjectMake");
if (!g_proxy_execute_jscore4.JSObjectMake)
goto jscore4_init_error;
g_proxy_execute_jscore4.JSObjectMakeFunctionWithCallback =
dlsym(g_proxy_execute_jscore4.module, "JSObjectMakeFunctionWithCallback");
if (!g_proxy_execute_jscore4.JSObjectMakeFunctionWithCallback)
Expand All @@ -409,12 +395,6 @@ void proxy_execute_jscore4_delayed_init(void) {
g_proxy_execute_jscore4.JSObjectSetProperty = dlsym(g_proxy_execute_jscore4.module, "JSObjectSetProperty");
if (!g_proxy_execute_jscore4.JSObjectSetProperty)
goto jscore4_init_error;

Check warning on line 397 in execute_jscore4.c

View check run for this annotation

Codecov / codecov/patch

execute_jscore4.c#L397

Added line #L397 was not covered by tests
g_proxy_execute_jscore4.JSObjectGetPrivate = dlsym(g_proxy_execute_jscore4.module, "JSObjectGetPrivate");
if (!g_proxy_execute_jscore4.JSObjectGetPrivate)
goto jscore4_init_error;
g_proxy_execute_jscore4.JSObjectSetPrivate = dlsym(g_proxy_execute_jscore4.module, "JSObjectSetPrivate");
if (!g_proxy_execute_jscore4.JSObjectSetPrivate)
goto jscore4_init_error;
// Context functions
g_proxy_execute_jscore4.JSContextGetGlobalObject =
dlsym(g_proxy_execute_jscore4.module, "JSContextGetGlobalObject");
Expand All @@ -436,12 +416,6 @@ void proxy_execute_jscore4_delayed_init(void) {
g_proxy_execute_jscore4.JSValueToNumber = dlsym(g_proxy_execute_jscore4.module, "JSValueToNumber");
if (!g_proxy_execute_jscore4.JSValueToNumber)
goto jscore4_init_error;

Check warning on line 418 in execute_jscore4.c

View check run for this annotation

Codecov / codecov/patch

execute_jscore4.c#L418

Added line #L418 was not covered by tests
g_proxy_execute_jscore4.JSValueMakeNull = dlsym(g_proxy_execute_jscore4.module, "JSValueMakeNull");
if (!g_proxy_execute_jscore4.JSValueMakeNull)
goto jscore4_init_error;
g_proxy_execute_jscore4.JSValueMakeBoolean = dlsym(g_proxy_execute_jscore4.module, "JSValueMakeBoolean");
if (!g_proxy_execute_jscore4.JSValueMakeBoolean)
goto jscore4_init_error;
g_proxy_execute_jscore4.JSValueMakeString = dlsym(g_proxy_execute_jscore4.module, "JSValueMakeString");
if (!g_proxy_execute_jscore4.JSValueMakeString)
goto jscore4_init_error;

Check warning on line 421 in execute_jscore4.c

View check run for this annotation

Codecov / codecov/patch

execute_jscore4.c#L421

Added line #L421 was not covered by tests
Expand Down

0 comments on commit 8681af3

Please sign in to comment.