View | Details | Raw Unified | Return to issue 76642
Collapse All | Expand All

(-)cli_ure-bak/source/climaker/climaker_csharp.cs (-41 / +46 lines)
Lines 160-174 class TypeEmitter : IDisposable Link Here
160
		Type ret = mModuleBuilder.GetType (args.Name, false);
160
		Type ret = mModuleBuilder.GetType (args.Name, false);
161
		//Console.WriteLine ("mModuleBuilder.GetType yields {0}", ret);
161
		//Console.WriteLine ("mModuleBuilder.GetType yields {0}", ret);
162
162
163
163
#if __MonoCS__
164
#endif
164
		if (ret == null) {
165
		if (ret == null) {
165
			IFaceEntry entry = mIncompleteIFaces [args.Name] as IFaceEntry;
166
			IFaceEntry entry = mIncompleteIFaces [args.Name] as IFaceEntry;
166
			if (entry != null)
167
			if (entry != null)
Lines 201-215 class TypeEmitter : IDisposable Link Here
201
		Type ret = mModuleBuilder.GetType (name, false);
192
		Type ret = mModuleBuilder.GetType (name, false);
202
		//Console.WriteLine ("mModuleBuilder.GetType yields {0}", ret);
193
		//Console.WriteLine ("mModuleBuilder.GetType yields {0}", ret);
203
194
204
195
#if __MonoCS__
196
#endif
205
		if (ret == null) {
197
		if (ret == null) {
206
			//Console.WriteLine ("looking name {0}", name);
198
			//Console.WriteLine ("looking name {0}", name);
207
			IFaceEntry entry = mIncompleteIFaces [name] as IFaceEntry;
199
			IFaceEntry entry = mIncompleteIFaces [name] as IFaceEntry;
Lines 1164-1186 class TypeEmitter : IDisposable Link Here
1164
					}
1146
					}
1165
1147
1166
					if (method.ReturnsStruct) {
1148
					if (method.ReturnsStruct) {
1167
						//Console.WriteLine ("returns struct");
1149
						// Console.WriteLine ("returns struct");
1168
1150
1169
						UnoXStructTypeDescription std = method.ReturnType as UnoXStructTypeDescription;
1151
						UnoXStructTypeDescription std = method.ReturnType as UnoXStructTypeDescription;
1170
						Type[] ats = new Type [std.TypeArguments];
1152
						if (std.TypeArguments != 0) {
1171
1153
							// Console.WriteLine ("std: '{0}' '{1}' {2}", std, method.ReturnType, method.ReturnType.Name);
1172
						//Console.WriteLine ("type arguments: {0}", std.TypeArguments);
1154
							Type[] ats = new Type [std.TypeArguments];
1173
1155
1174
						for (j = 0; j < std.TypeArguments; j ++) {
1156
							// Console.WriteLine ("type arguments: {0}", std.TypeArguments);
1175
							ats [j] = GetType (std.TypeArgument (j));
1157
1176
							//Console.WriteLine ("ats [{0}] = {1}", j, ats [j]);
1158
							for (j = 0; j < std.TypeArguments; j ++) {
1177
						}
1159
								ats [j] = GetType (std.TypeArgument (j));
1160
								//Console.WriteLine ("ats [{0}] = {1}", j, ats [j]);
1161
							}
1178
1162
1179
						object[] atso = { ats };
1163
							object[] atso = { ats };
1180
						Type[] ctor = { typeof (Type[]) };
1164
							Type[] ctor = { typeof (Type[]) };
1181
						attrBuilder = new CustomAttributeBuilder (typeof (uno.TypeArgumentsAttribute).GetConstructor (ctor),
1165
							attrBuilder = new CustomAttributeBuilder (typeof (uno.TypeArgumentsAttribute).GetConstructor (ctor),
1182
																  atso);
1166
																  atso);
1183
						methodBuilder.SetCustomAttribute (attrBuilder);
1167
							methodBuilder.SetCustomAttribute (attrBuilder);
1168
						}
1184
					}
1169
					}
1185
1170
1186
					// define UNO exception attribute (exceptions) --------------------------------------
1171
					// define UNO exception attribute (exceptions) --------------------------------------
Lines 2051-2057 class UnoXTypeDescription : UnoObject Link Here
2051
    {
2036
    {
2052
		get
2037
		get
2053
		{
2038
		{
2054
			return cmm_x_type_description_get_name (mHandle);
2039
			return Marshal.PtrToStringAnsi (cmm_x_type_description_get_name (mHandle));
2055
		}
2040
		}
2056
    }
2041
    }
2057
2042
Lines 2064-2070 class UnoXTypeDescription : UnoObject Link Here
2064
    }
2049
    }
2065
2050
2066
    [DllImport("climaker")]
2051
    [DllImport("climaker")]
2067
    private static extern string cmm_x_type_description_get_name (IntPtr handle);
2052
    private static extern IntPtr cmm_x_type_description_get_name (IntPtr handle);
2068
2053
2069
    [DllImport("climaker")]
2054
    [DllImport("climaker")]
2070
    private static extern UnoTypeClass cmm_x_type_description_get_type_class (IntPtr handle);
2055
    private static extern UnoTypeClass cmm_x_type_description_get_type_class (IntPtr handle);
Lines 2086-2092 class UnoXEnumTypeDescription : UnoXType Link Here
2086
2071
2087
    public string ValueName (int idx)
2072
    public string ValueName (int idx)
2088
    {
2073
    {
2089
		return cmm_x_enum_type_description_get_name (mHandle, idx);
2074
		return Marshal.PtrToStringAnsi (cmm_x_enum_type_description_get_name (mHandle, idx));
2090
    }
2075
    }
2091
2076
2092
    public int Value (int idx)
2077
    public int Value (int idx)
Lines 2101-2107 class UnoXEnumTypeDescription : UnoXType Link Here
2101
    private static extern int cmm_x_enum_type_description_get_value (IntPtr handle, int idx);
2086
    private static extern int cmm_x_enum_type_description_get_value (IntPtr handle, int idx);
2102
2087
2103
    [DllImport("climaker")]
2088
    [DllImport("climaker")]
2104
    private static extern string cmm_x_enum_type_description_get_name (IntPtr handle, int idx);
2089
    private static extern IntPtr cmm_x_enum_type_description_get_name (IntPtr handle, int idx);
2105
}
2090
}
2106
2091
2107
class UnoXInterfaceTypeDescription : UnoXTypeDescription
2092
class UnoXInterfaceTypeDescription : UnoXTypeDescription
Lines 2175-2186 class UnoXInterfaceMemberTypeDescription Link Here
2175
    {
2160
    {
2176
		get
2161
		get
2177
		{
2162
		{
2178
			return cmm_x_interface_member_type_description_get_member_name (mHandle);
2163
			return Marshal.PtrToStringAnsi (cmm_x_interface_member_type_description_get_member_name (mHandle));
2179
		}
2164
		}
2180
    }
2165
    }
2181
2166
2182
    [DllImport("climaker")]
2167
    [DllImport("climaker")]
2183
    private static extern string cmm_x_interface_member_type_description_get_member_name (IntPtr handle);
2168
    private static extern IntPtr cmm_x_interface_member_type_description_get_member_name (IntPtr handle);
2184
}
2169
}
2185
2170
2186
class UnoXInterfaceAttributeTypeDescription : UnoXInterfaceMemberTypeDescription
2171
class UnoXInterfaceAttributeTypeDescription : UnoXInterfaceMemberTypeDescription
Lines 2262-2271 class UnoXInterfaceAttributeTypeDescript Link Here
2262
    [DllImport("climaker")]
2247
    [DllImport("climaker")]
2263
    private static extern IntPtr cmm_x_interface_attribute_type_description_get_type (IntPtr handle);
2248
    private static extern IntPtr cmm_x_interface_attribute_type_description_get_type (IntPtr handle);
2264
2249
2265
    [DllImport("climaker")]
2250
    [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
2266
    private static extern bool cmm_x_interface_attribute_type_description_is_bound (IntPtr handle);
2251
    private static extern bool cmm_x_interface_attribute_type_description_is_bound (IntPtr handle);
2267
2252
2268
    [DllImport("climaker")]
2253
    [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
2269
    private static extern bool cmm_x_interface_attribute_type_description_is_read_only (IntPtr handle);
2254
    private static extern bool cmm_x_interface_attribute_type_description_is_read_only (IntPtr handle);
2270
2255
2271
    [DllImport("climaker")]
2256
    [DllImport("climaker")]
Lines 2389-2398 class UnoXInterfaceMethodTypeDescription Link Here
2389
    [DllImport("climaker")]
2374
    [DllImport("climaker")]
2390
    private static extern IntPtr cmm_x_interface_method_type_description_get_return_type (IntPtr handle);
2375
    private static extern IntPtr cmm_x_interface_method_type_description_get_return_type (IntPtr handle);
2391
2376
2392
    [DllImport("climaker")]
2377
    [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
2393
    private static extern bool cmm_x_interface_method_type_description_returns_struct (IntPtr handle);
2378
    private static extern bool cmm_x_interface_method_type_description_returns_struct (IntPtr handle);
2394
2379
2395
    [DllImport("climaker")]
2380
    [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
2396
    private static extern bool cmm_x_interface_method_type_description_is_oneway (IntPtr handle);
2381
    private static extern bool cmm_x_interface_method_type_description_is_oneway (IntPtr handle);
2397
}
2382
}
2398
2383
Lines 2429-2435 class UnoXCompoundTypeDescription : UnoX Link Here
2429
		if (idx < 0 || idx >= mMemberNames)
2414
		if (idx < 0 || idx >= mMemberNames)
2430
			return null;
2415
			return null;
2431
2416
2432
		return cmm_x_compound_type_description_get_member_name (mMemberNamesHandle, idx);
2417
		return Marshal.PtrToStringAnsi (cmm_x_compound_type_description_get_member_name (mMemberNamesHandle, idx));
2433
    }
2418
    }
2434
2419
2435
    public int MemberNames
2420
    public int MemberNames
Lines 2475-2481 class UnoXCompoundTypeDescription : UnoX Link Here
2475
    private static extern int cmm_x_compound_type_description_get_member_names (IntPtr handle, out IntPtr memberNamesHandle);
2460
    private static extern int cmm_x_compound_type_description_get_member_names (IntPtr handle, out IntPtr memberNamesHandle);
2476
2461
2477
    [DllImport("climaker")]
2462
    [DllImport("climaker")]
2478
    private static extern string cmm_x_compound_type_description_get_member_name (IntPtr handle, int idx);
2463
    private static extern IntPtr cmm_x_compound_type_description_get_member_name (IntPtr handle, int idx);
2479
2464
2480
    [DllImport("climaker")]
2465
    [DllImport("climaker")]
2481
    private static extern int cmm_x_compound_type_description_get_member_types (IntPtr handle, out IntPtr memberTypesHandle);
2466
    private static extern int cmm_x_compound_type_description_get_member_types (IntPtr handle, out IntPtr memberTypesHandle);
Lines 2517-2523 class UnoXStructTypeDescription : UnoXCo Link Here
2517
		if (idx < 0 || idx >= mTypeParameters)
2502
		if (idx < 0 || idx >= mTypeParameters)
2518
			return null;
2503
			return null;
2519
2504
2520
		return cmm_x_struct_type_description_get_type_parameter (mTypeParametersHandle, idx);
2505
		return Marshal.PtrToStringAnsi (cmm_x_struct_type_description_get_type_parameter (mTypeParametersHandle, idx));
2521
    }
2506
    }
2522
2507
2523
    public int TypeParameters
2508
    public int TypeParameters
Lines 2560-2566 class UnoXStructTypeDescription : UnoXCo Link Here
2560
    private static extern int cmm_x_struct_type_description_get_type_parameters (IntPtr handle, out IntPtr typeParametersHandle);
2545
    private static extern int cmm_x_struct_type_description_get_type_parameters (IntPtr handle, out IntPtr typeParametersHandle);
2561
2546
2562
    [DllImport("climaker")]
2547
    [DllImport("climaker")]
2563
    private static extern string cmm_x_struct_type_description_get_type_parameter (IntPtr typeParametersHandle, int idx);
2548
    private static extern IntPtr cmm_x_struct_type_description_get_type_parameter (IntPtr typeParametersHandle, int idx);
2564
2549
2565
    [DllImport("climaker")]
2550
    [DllImport("climaker")]
2566
    private static extern int cmm_x_struct_type_description_get_type_arguments (IntPtr handle, out IntPtr typeArgumentsHandle, out IntPtr typeArgumentsArrayHandle);
2551
    private static extern int cmm_x_struct_type_description_get_type_arguments (IntPtr handle, out IntPtr typeArgumentsHandle, out IntPtr typeArgumentsArrayHandle);
Lines 2595-2601 class UnoXMethodParameter : UnoObject Link Here
2595
    {
2580
    {
2596
		get
2581
		get
2597
	    {
2582
	    {
2598
			return cmm_x_method_parameter_name (mHandle);
2583
			return Marshal.PtrToStringAnsi (cmm_x_method_parameter_name (mHandle));
2599
		}
2584
		}
2600
    }
2585
    }
2601
2586
Lines 2615-2631 class UnoXMethodParameter : UnoObject Link Here
2615
		}
2600
		}
2616
    }
2601
    }
2617
2602
2618
    [DllImport("climaker")]
2603
    [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
2619
    private static extern bool cmm_x_method_parameter_is_out (IntPtr handle);
2604
    private static extern bool cmm_x_method_parameter_is_out (IntPtr handle);
2620
2605
2621
    [DllImport("climaker")]
2606
    [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
2622
    private static extern bool cmm_x_method_parameter_is_in (IntPtr handle);
2607
    private static extern bool cmm_x_method_parameter_is_in (IntPtr handle);
2623
2608
2624
    [DllImport("climaker")]
2609
    [DllImport("climaker")]
2625
    private static extern int cmm_x_method_parameter_position (IntPtr handle);
2610
    private static extern int cmm_x_method_parameter_position (IntPtr handle);
2626
2611
2627
    [DllImport("climaker")]
2612
    [DllImport("climaker")]
2628
    private static extern string cmm_x_method_parameter_name (IntPtr handle);
2613
    private static extern IntPtr cmm_x_method_parameter_name (IntPtr handle);
2629
2614
2630
    [DllImport("climaker")]
2615
    [DllImport("climaker")]
2631
    private static extern IntPtr cmm_x_method_parameter_type (IntPtr handle);
2616
    private static extern IntPtr cmm_x_method_parameter_type (IntPtr handle);
Lines 2645-2651 class UnoXParameter : UnoXMethodParamete Link Here
2645
		}
2630
		}
2646
    }
2631
    }
2647
2632
2648
    [DllImport("climaker")]
2633
    [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
2649
    private static extern bool cmm_x_parameter_is_rest (IntPtr handle);
2634
    private static extern bool cmm_x_parameter_is_rest (IntPtr handle);
2650
}
2635
}
2651
2636
Lines 2724-2730 class UnoXServiceTypeDescription : UnoXT Link Here
2724
	[DllImport("climaker")]
2709
	[DllImport("climaker")]
2725
	private static extern IntPtr cmm_x_service_type_description_get_constructor (IntPtr constructorsHandle, int idx);
2710
	private static extern IntPtr cmm_x_service_type_description_get_constructor (IntPtr constructorsHandle, int idx);
2726
2711
2727
    [DllImport("climaker")]
2712
    [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
2728
    private static extern bool cmm_x_service_type_description_is_single_interface_based (IntPtr handle);
2713
    private static extern bool cmm_x_service_type_description_is_single_interface_based (IntPtr handle);
2729
2714
2730
    [DllImport("climaker")]
2715
    [DllImport("climaker")]
Lines 2756-2762 class UnoXSingletonTypeDescription : Uno Link Here
2756
    [DllImport("climaker")]
2741
    [DllImport("climaker")]
2757
    private static extern IntPtr cmm_x_singleton_type_description_get_interface (IntPtr handle);
2742
    private static extern IntPtr cmm_x_singleton_type_description_get_interface (IntPtr handle);
2758
2743
2759
    [DllImport("climaker")]
2744
    [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
2760
    private static extern bool cmm_x_singleton_type_description_is_interface_based (IntPtr handle);
2745
    private static extern bool cmm_x_singleton_type_description_is_interface_based (IntPtr handle);
2761
}
2746
}
2762
2747
Lines 2777-2783 class UnoXConstantTypeDescription : UnoX Link Here
2777
			System.UInt16 tUInt16;
2762
			System.UInt16 tUInt16;
2778
			Int32 tInt32;
2763
			Int32 tInt32;
2779
			System.UInt32 tUInt32;
2764
			System.UInt32 tUInt32;
2780
			Int16 tInt64;
2765
			Int64 tInt64;
2781
			System.UInt64 tUInt64;
2766
			System.UInt64 tUInt64;
2782
			System.Single tFloat;
2767
			System.Single tFloat;
2783
			double tDouble;
2768
			double tDouble;
Lines 2824-2830 class UnoXConstantTypeDescription : UnoX Link Here
2824
								out byte tByte,
2809
								out byte tByte,
2825
								out Int16 tInt16, out System.UInt16 tUInt16,
2810
								out Int16 tInt16, out System.UInt16 tUInt16,
2826
								out Int32 tInt32, out System.UInt32 tUInt32,
2811
								out Int32 tInt32, out System.UInt32 tUInt32,
2827
								out Int16 tInt64, out System.UInt64 tUInt64,
2812
								out Int64 tInt64, out System.UInt64 tUInt64,
2828
								out System.Single tFloat, out double tDouble);
2813
								out System.Single tFloat, out double tDouble);
2829
}
2814
}
2830
2815
Lines 2909-2915 class UnoXServiceConstructorDescription Link Here
2909
    {
2894
    {
2910
		get
2895
		get
2911
	    {
2896
	    {
2912
			return cmm_x_service_constructor_description_get_name (mHandle);
2897
			return Marshal.PtrToStringAnsi (cmm_x_service_constructor_description_get_name (mHandle));
2913
		}
2898
		}
2914
    }
2899
    }
2915
2900
Lines 2949-2957 class UnoXServiceConstructorDescription Link Here
2949
	private static extern IntPtr cmm_x_service_constructor_description_get_parameter (IntPtr parametersHandle, int idx);
2934
	private static extern IntPtr cmm_x_service_constructor_description_get_parameter (IntPtr parametersHandle, int idx);
2950
2935
2951
    [DllImport("climaker")]
2936
    [DllImport("climaker")]
2952
    private static extern string cmm_x_service_constructor_description_get_name (IntPtr handle);
2937
    private static extern IntPtr cmm_x_service_constructor_description_get_name (IntPtr handle);
2953
2938
2954
    [DllImport("climaker")]
2939
    [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
2955
    private static extern bool cmm_x_service_constructor_description_is_default_constructor (IntPtr handle);
2940
    private static extern bool cmm_x_service_constructor_description_is_default_constructor (IntPtr handle);
2956
2941
2957
    [DllImport("climaker")]
2942
    [DllImport("climaker")]
(-)cli_ure-bak/source/climaker/climaker_mono.cxx (-2 / +2 lines)
Lines 151-157 class UnoHelper Link Here
151
    Reference< XInterface > mxTD_provider;
151
    Reference< XInterface > mxTD_provider;
152
    Reference< reflection::XTypeDescriptionEnumeration > mxTD_enum;
152
    Reference< reflection::XTypeDescriptionEnumeration > mxTD_enum;
153
    Reference< reflection::XTypeDescription > mxTD;
153
    Reference< reflection::XTypeDescription > mxTD;
154
    sal_Int32 mnPos;
154
    sal_uInt32 mnPos;
155
155
156
    vector< OUString > mMandatoryRegistries;
156
    vector< OUString > mMandatoryRegistries;
157
    vector< OUString > mExtraRegistries;
157
    vector< OUString > mExtraRegistries;
Lines 1001-1007 extern "C" { Link Here
1001
                             sal_uInt8 *tByte,
1001
                             sal_uInt8 *tByte,
1002
                             sal_Int16 *tInt16, sal_uInt16 *tUInt16,
1002
                             sal_Int16 *tInt16, sal_uInt16 *tUInt16,
1003
                             sal_Int32 *tInt32, sal_uInt32 *tUInt32,
1003
                             sal_Int32 *tInt32, sal_uInt32 *tUInt32,
1004
                             sal_Int16 *tInt64, sal_uInt64 *tUInt64,
1004
                             sal_Int64 *tInt64, sal_uInt64 *tUInt64,
1005
                             float *tFloat, double *tDouble)
1005
                             float *tFloat, double *tDouble)
1006
    {
1006
    {
1007
        reflection::XConstantTypeDescription* xtd = (reflection::XConstantTypeDescription*) ptr;
1007
        reflection::XConstantTypeDescription* xtd = (reflection::XConstantTypeDescription*) ptr;
(-)cli_ure-bak/source/climaker/makefile.mk (-42 / +23 lines)
Lines 103-150 UNOTYPES = \ Link Here
103
	com.sun.star.reflection.XSingletonTypeDescription2		\
103
	com.sun.star.reflection.XSingletonTypeDescription2		\
104
	com.sun.star.reflection.XStructTypeDescription
104
	com.sun.star.reflection.XStructTypeDescription
105
105
106
CFLAGSCXX +=-AI$(BIN)
106
SLOFILES = $(SLO)$/climaker_mono.obj
107
107
SHL1OBJS=$(SLOFILES)
108
108
SHL1STDLIBS=$(CPPULIB) $(CPPUHELPERLIB) $(SALLIB)
109
# When compiling for CLR, disable "warning C4339: use of undefined type detected
109
SHL1TARGET=$(TARGET)
110
# in CLR meta-data - use of this type may lead to a runtime exception":
110
SHL1IMPLIB=i$(TARGET).lib
111
.IF "$(COMEX)"=="10"
111
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
112
CFLAGSCXX += -clr:noAssembly -wd4339
112
SHL1VERSIONMAP=climaker.map
113
.ELSE
113
114
CFLAGSCXX += -clr:oldSyntax -LN -wd4339 -wd4715
114
DEF1NAME=$(SHL1TARGET)
115
.ENDIF
115
116
116
ALLTAR : $(BIN)/climaker.exe $(BIN)$/climaker.exe.config
117
OBJFILES = \
117
118
	$(OBJ)$/climaker_app.obj	\
118
CSFILES = climaker_csharp.cs
119
	$(OBJ)$/climaker_emit.obj
119
120
120
$(BIN)/climaker.exe:   $(CSFILES)
121
APP1TARGET = $(TARGET)
121
        +$(CSC) $(CSCFLAGS) -debug:full \
122
APP1OBJS = $(OBJFILES)
122
                -out:$@ \
123
123
                -reference:$(OUT)$/bin$/cli_basetypes.dll \
124
124
                -reference:System.dll \
125
APP1STDLIBS = \
125
                $(CSFILES)
126
	$(CPPUHELPERLIB)		\
127
	$(CPPULIB)			\
128
	$(SALLIB)			\
129
	mscoree.lib
130
131
.IF "$(CCNUMVER)" >= "001399999999"
132
APP1STDLIBS += \
133
	msvcmrt.lib
134
.ENDIF
135
136
.ENDIF
137
138
139
140
.INCLUDE : $(PRJ)$/util$/target.pmk
141
.INCLUDE :  target.mk
142
143
.IF "$(BUILD_FOR_CLI)" != ""
144
145
$(OBJFILES): $(BIN)$/cli_basetypes.dll
146
147
ALLTAR : $(BIN)$/climaker.exe.config
148
126
149
$(BIN)$/climaker.exe.config : climaker.exe.config
127
$(BIN)$/climaker.exe.config : climaker.exe.config
150
	$(GNUCOPY) -f $? $@
128
	$(GNUCOPY) -f $? $@
Lines 152-157 $(BIN)$/climaker.exe.config : climaker.e Link Here
152
	+chmod +x $@
130
	+chmod +x $@
153
.ENDIF
131
.ENDIF
154
132
133
.INCLUDE :  target.mk
134
.INCLUDE : $(PRJ)$/util$/target.pmk
135
155
.ENDIF
136
.ENDIF
156
137
157
.ENDIF
138
.ENDIF

Return to issue 76642