Drop unused patches
This commit is contained in:
parent
4a51d64389
commit
081793422d
@ -1,120 +0,0 @@
|
||||
diff -up newer-but-still-old/gi/function.c.fix-ffi-on-big-endian newer-but-still-old/gi/function.c
|
||||
--- newer-but-still-old/gi/function.c.fix-ffi-on-big-endian 2011-11-28 15:24:07.453082729 -0600
|
||||
+++ newer-but-still-old/gi/function.c 2011-11-29 12:25:58.317567749 -0600
|
||||
@@ -166,6 +166,8 @@ gjs_callback_closure(ffi_cif *cif,
|
||||
int i, n_args, n_jsargs;
|
||||
jsval *jsargs, rval;
|
||||
GITypeInfo ret_type;
|
||||
+ GITypeTag return_tag;
|
||||
+ GArgument return_value;
|
||||
gboolean success = FALSE;
|
||||
|
||||
trampoline = data;
|
||||
@@ -215,10 +217,55 @@ gjs_callback_closure(ffi_cif *cif,
|
||||
GJS_ARGUMENT_RETURN_VALUE,
|
||||
FALSE,
|
||||
TRUE,
|
||||
- result)) {
|
||||
+ &return_value)) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
+ return_tag = g_type_info_get_tag(&ret_type);
|
||||
+ switch (return_tag) {
|
||||
+ case GI_TYPE_TAG_INT8:
|
||||
+ *(ffi_sarg *) result = (gint8) return_value.v_int8;
|
||||
+ case GI_TYPE_TAG_UINT8:
|
||||
+ *(ffi_arg *) result = (guint8) return_value.v_uint8;
|
||||
+ break;
|
||||
+ case GI_TYPE_TAG_INT16:
|
||||
+ *(ffi_sarg *) result = (gint16) return_value.v_int16;
|
||||
+ break;
|
||||
+ case GI_TYPE_TAG_UINT16:
|
||||
+ *(ffi_arg *) result = (guint16) return_value.v_uint16;
|
||||
+ break;
|
||||
+ case GI_TYPE_TAG_INT32:
|
||||
+ *(ffi_sarg *) result = (gint32) return_value.v_int32;
|
||||
+ break;
|
||||
+ case GI_TYPE_TAG_UINT32:
|
||||
+ case GI_TYPE_TAG_BOOLEAN:
|
||||
+ case GI_TYPE_TAG_UNICHAR:
|
||||
+ *(ffi_arg *) result = (guint32) return_value.v_uint32;
|
||||
+
|
||||
+ break;
|
||||
+ case GI_TYPE_TAG_INTERFACE:
|
||||
+ {
|
||||
+ GIBaseInfo* interface_info;
|
||||
+ GIInfoType interface_type;
|
||||
+
|
||||
+ interface_info = g_type_info_get_interface(&ret_type);
|
||||
+ interface_type = g_base_info_get_type(interface_info);
|
||||
+
|
||||
+ switch (interface_type) {
|
||||
+ case GI_INFO_TYPE_ENUM:
|
||||
+ case GI_INFO_TYPE_FLAGS:
|
||||
+ *(ffi_sarg *) result = (gint32) return_value.v_long;
|
||||
+ break;
|
||||
+ default:
|
||||
+ *(ffi_arg *) result = (ffi_arg) return_value.v_pointer;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ default:
|
||||
+ *(ffi_arg *) result = (ffi_arg) return_value.v_pointer;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
success = TRUE;
|
||||
|
||||
out:
|
||||
@@ -673,6 +720,50 @@ gjs_invoke_c_function(JSContext *co
|
||||
|
||||
g_assert_cmpuint(next_rval, <, function->js_out_argc);
|
||||
|
||||
+ switch (return_tag) {
|
||||
+ case GI_TYPE_TAG_INT8:
|
||||
+ return_value.v_int8 = (gint8) return_value.v_long;
|
||||
+ case GI_TYPE_TAG_UINT8:
|
||||
+ return_value.v_uint8 = (guint8) return_value.v_ulong;
|
||||
+ break;
|
||||
+ case GI_TYPE_TAG_INT16:
|
||||
+ return_value.v_int16 = (gint16) return_value.v_long;
|
||||
+ break;
|
||||
+ case GI_TYPE_TAG_UINT16:
|
||||
+ return_value.v_uint16 = (guint16) return_value.v_ulong;
|
||||
+ break;
|
||||
+ case GI_TYPE_TAG_INT32:
|
||||
+ return_value.v_int32 = (gint32) return_value.v_long;
|
||||
+ break;
|
||||
+ case GI_TYPE_TAG_UINT32:
|
||||
+ case GI_TYPE_TAG_BOOLEAN:
|
||||
+ case GI_TYPE_TAG_UNICHAR:
|
||||
+ return_value.v_uint32 = (guint32) return_value.v_ulong;
|
||||
+
|
||||
+ break;
|
||||
+ case GI_TYPE_TAG_INTERFACE:
|
||||
+ {
|
||||
+ GIBaseInfo* interface_info;
|
||||
+ GIInfoType interface_type;
|
||||
+
|
||||
+ interface_info = g_type_info_get_interface(&return_info);
|
||||
+ interface_type = g_base_info_get_type(interface_info);
|
||||
+
|
||||
+
|
||||
+ switch(interface_type) {
|
||||
+ case GI_INFO_TYPE_ENUM:
|
||||
+ case GI_INFO_TYPE_FLAGS:
|
||||
+ return_value.v_int32 = (gint32) return_value.v_long;
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
array_length_pos = g_type_info_get_array_length(&return_info);
|
||||
if (array_length_pos >= 0) {
|
||||
GIArgInfo array_length_arg;
|
@ -1,63 +0,0 @@
|
||||
From 4217cb5e07519ea41fdff9b906b93ce6946c109e Mon Sep 17 00:00:00 2001
|
||||
From: Colin Walters <walters@verbum.org>
|
||||
Date: Sat, 30 Jul 2011 11:40:25 -0400
|
||||
Subject: [PATCH] Install gi/ headers again
|
||||
|
||||
libpeas currently requires these; we were installing them before, and
|
||||
since we export almost all of our internals in for gjs-module.pc, might
|
||||
as well keep doing these for now.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=655482
|
||||
---
|
||||
Makefile.am | 28 ++++++++++++++--------------
|
||||
1 files changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index edf0c25..b088289 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -36,7 +36,20 @@ nobase_gjs_module_include_HEADERS = \
|
||||
gjs/importer.h \
|
||||
gjs/jsapi-util.h \
|
||||
gjs/mem.h \
|
||||
- gjs/native.h
|
||||
+ gjs/native.h \
|
||||
+ gi/ns.h \
|
||||
+ gi/object.h \
|
||||
+ gi/foreign.h \
|
||||
+ gi/param.h \
|
||||
+ gi/repo.h \
|
||||
+ gi/union.h \
|
||||
+ gi/value.h \
|
||||
+ gi/arg.h \
|
||||
+ gi/boxed.h \
|
||||
+ gi/closure.h \
|
||||
+ gi/enumeration.h \
|
||||
+ gi/function.h \
|
||||
+ gi/keep-alive.h
|
||||
|
||||
noinst_HEADERS += \
|
||||
gjs/jsapi-private.h \
|
||||
@@ -108,20 +121,7 @@ libgjs_la_SOURCES = \
|
||||
|
||||
# For historical reasons, some files live in gi/
|
||||
libgjs_la_SOURCES += \
|
||||
- gi/arg.h \
|
||||
- gi/boxed.h \
|
||||
- gi/closure.h \
|
||||
- gi/enumeration.h \
|
||||
- gi/function.h \
|
||||
- gi/keep-alive.h \
|
||||
gi/gjs_gi_trace.h \
|
||||
- gi/ns.h \
|
||||
- gi/object.h \
|
||||
- gi/foreign.h \
|
||||
- gi/param.h \
|
||||
- gi/repo.h \
|
||||
- gi/union.h \
|
||||
- gi/value.h \
|
||||
gi/arg.c \
|
||||
gi/boxed.c \
|
||||
gi/closure.c \
|
||||
--
|
||||
1.7.6
|
Loading…
Reference in New Issue
Block a user