Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

2010-03-18 Gonzalo Paniagua Javier <gonzalo@novell.com>

	* mono-mlist.[ch]: add mono_mlist_set_next ().


svn path=/trunk/mono/; revision=153821
  • Loading branch information...
commit 4069bec9d7f56d0682409800f2e99d38682e5a82 1 parent 9be6f4f
@gonzalop gonzalop authored
View
4 mono/metadata/ChangeLog
@@ -1,3 +1,7 @@
+2010-03-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+ * mono-mlist.[ch]: add mono_mlist_set_next ().
+
2010-03-16 Rodrigo Kumpera <rkumpera@novell.com>
* domain-internals.h: Add MonoTryBlockHoleJitInfo struct and
View
21 mono/metadata/mono-mlist.c
@@ -11,7 +11,7 @@
#include "mono/metadata/appdomain.h"
#include "mono/metadata/class-internals.h"
-/* matches the System.MonoListItem objcet*/
+/* matches the System.MonoListItem object*/
struct _MonoMList {
MonoObject object;
MonoMList *next;
@@ -73,6 +73,23 @@ mono_mlist_set_data (MonoMList* list, MonoObject *data)
}
/**
+ * mono_mlist_set_next:
+ * @list: a managed list node
+ * @next: list node that will be next for the @list node.
+ *
+ * Set next node for @list to @next.
+ */
+MonoMList *
+mono_mlist_set_next (MonoMList* list, MonoMList *next)
+{
+ if (!list)
+ return next;
+
+ MONO_OBJECT_SETREF (list, next, next);
+ return list;
+}
+
+/**
* mono_mlist_length:
* @list: the managed list
*
@@ -175,7 +192,7 @@ find_prev (MonoMList* list, MonoMList *item)
/**
* mono_mlist_remove_item:
* @list: the managed list
- * @data: the object to add to the list
+ * @data: the object to remove from the list
*
* Remove the list node @item from the managed list @list.
* Since managed lists are singly-linked, this operation can take O(n) time.
View
2  mono/metadata/mono-mlist.h
@@ -8,10 +8,10 @@
#include <mono/metadata/object.h>
typedef struct _MonoMList MonoMList;
-
MonoMList* mono_mlist_alloc (MonoObject *data);
MonoObject* mono_mlist_get_data (MonoMList* list);
void mono_mlist_set_data (MonoMList* list, MonoObject *data);
+MonoMList* mono_mlist_set_next (MonoMList* list, MonoMList *next);
int mono_mlist_length (MonoMList* list);
MonoMList* mono_mlist_next (MonoMList* list);
MonoMList* mono_mlist_last (MonoMList* list);
Please sign in to comment.
Something went wrong with that request. Please try again.