[prev in list] [next in list] [prev in thread] [next in thread]
List: mono-list
Subject: [Mono-list] allow mono to be embedded into c++ applications
From: "Joseph Wenninger" <kde () jowenn ! at>
Date: 2002-08-12 11:08:09
[Download RAW message or body]
This is a MIME encoded message.
[Attachment #2 (text/plain)]
Hi
I enclose two patches, which contain my changes, which I had to
do in the io-layer/atomic.h and the metadata/object.h file. With
those patches applied I could use the source copied from
samples/embed/teste.c within a C++ application (namely KDE's
kate).
I hope that it is possible to put them into the mono releases.
"new" and "this" are C++ keywords, which must not be used as
variable names in headers, which are to be included into c++
Kind regards
Joseph Wenninger
[Attachment #3 (unknown)]
--- /usr/src/mono/mono/mono/io-layer/atomic.h Sat Jun 1 09:41:08 2002
+++ atomic.h Mon Aug 12 12:24:12 2002
@@ -74,25 +74,25 @@
* http://msdn.microsoft.com/library/en-us/dnmag00/html/win320700.asp?frame=true
* for the reasons for using cmpxchg and a loop here.
*/
-static inline gint32 InterlockedExchange(volatile gint32 *val, gint32 new)
+static inline gint32 InterlockedExchange(volatile gint32 *val, gint32 new_interlocked)
{
gint32 ret;
__asm__ __volatile__ ("1:; lock; cmpxchgl %2, %0; jne 1b"
: "=m" (*val), "=a" (ret)
- : "r" (new), "m" (*val), "a" (*val));
+ : "r" (new_interlocked), "m" (*val), "a" (*val));
return(ret);
}
static inline gpointer InterlockedExchangePointer(volatile gpointer *val,
- gpointer new)
+ gpointer new_interlockedPtr)
{
gpointer ret;
__asm__ __volatile__ ("1:; lock; cmpxchgl %2, %0; jne 1b"
: "=m" (*val), "=a" (ret)
- : "r" (new), "m" (*val), "a" (*val));
+ : "r" (new_interlockedPtr), "m" (*val), "a" (*val));
return(ret);
}
[Attachment #4 (unknown)]
--- /usr/src/mono/mono/mono/metadata/object.h Fri Aug 2 17:49:32 2002
+++ object.h Mon Aug 12 12:29:00 2002
@@ -263,7 +263,7 @@
mono_raise_exception (MonoException *ex);
void
-mono_runtime_object_init (MonoObject *this);
+mono_runtime_object_init (MonoObject *this_obj);
void
mono_runtime_class_init (MonoClass *klass);
@@ -308,7 +308,7 @@
mono_wait_handle_new (MonoDomain *domain, HANDLE handle);
void
-mono_message_init (MonoDomain *domain, MonoMethodMessage *this,
+mono_message_init (MonoDomain *domain, MonoMethodMessage *this_obj,
MonoReflectionMethod *method, MonoArray *out_args);
MonoObject *
@@ -324,10 +324,10 @@
MonoDelegate **cb, MonoObject **state);
gpointer
-mono_load_remote_field (MonoObject *this, MonoClass *klass, MonoClassField *field, gpointer *res);
+mono_load_remote_field (MonoObject *this_obj, MonoClass *klass, MonoClassField *field, gpointer *res);
void
-mono_store_remote_field (MonoObject *this, MonoClass *klass, MonoClassField *field, gpointer val);
+mono_store_remote_field (MonoObject *this_obj, MonoClass *klass, MonoClassField *field, gpointer val);
void
mono_method_return_message_restore (MonoMethod *method, gpointer *params, MonoArray *out_args);
@@ -339,7 +339,7 @@
mono_print_unhandled_exception (MonoObject *exc);
void
-mono_delegate_ctor (MonoObject *this, MonoObject *target, gpointer addr);
+mono_delegate_ctor (MonoObject *this_obj, MonoObject *target, gpointer addr);
gpointer
mono_compile_method (MonoMethod *method);
_______________________________________________
Mono-list maillist - Mono-list@ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic