[Mono-bugs] [Bug 74482][Wis] Changed - mono uses method param type instead of type in the Constant MD table to interpret the constant value
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 7 Apr 2005 11:11:22 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by radical@gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=74482
--- shadow/74482 2005-04-07 10:33:11.000000000 -0400
+++ shadow/74482.tmp.10197 2005-04-07 11:11:22.000000000 -0400
@@ -118,6 +118,14 @@
- if (!param->DefaultValueImpl) {
+ /* Type in the Constant table is MONO_TYPE_CLASS for nulls */
+ if (types [i] != MONO_TYPE_CLASS && !param->DefaultValueImpl)
param->DefaultValueImpl = dbnull;
- }
+
+------- Additional Comments From radical@gmail.com 2005-04-07 11:11 -------
+The method "mono_get_object_from_blob" returns NULL also in the case
+when the default value is NULL (nullref). According to the specs, a
+nullref is encoded as a E_T_CLASS (in the constant table) and in the
+blob (04 00 00 00 00). So, to differentiate/a normal null being
+returned from this "default value of NULL" we can check if the type of
+the default val is MONO_TYPE_CLASS.