1 diff -rup cli_ure-bak/source/climaker/climaker_csharp.cs cli_ure/source/climaker/climaker_csharp.cs
2 --- cli_ure-bak/source/climaker/climaker_csharp.cs 2007-03-29 16:22:58.000000000 +0200
3 +++ cli_ure/source/climaker/climaker_csharp.cs 2007-03-29 16:28:44.000000000 +0200
4 @@ -160,15 +160,16 @@ class TypeEmitter : IDisposable
5 Type ret = mModuleBuilder.GetType (args.Name, false);
6 //Console.WriteLine ("mModuleBuilder.GetType yields {0}", ret);
9 if (ret is TypeBuilder) {
10 TypeBuilder tb = ret as TypeBuilder;
11 //Console.WriteLine ("{0} is type builder", tb);
12 if (tb.IsCreated ()) {
13 ret = tb.CreateType ();
14 //Console.WriteLine ("resolving to created {0} {1}", ret, tb);
20 IFaceEntry entry = mIncompleteIFaces [args.Name] as IFaceEntry;
22 @@ -201,15 +192,16 @@ class TypeEmitter : IDisposable
23 Type ret = mModuleBuilder.GetType (name, false);
24 //Console.WriteLine ("mModuleBuilder.GetType yields {0}", ret);
27 if (ret is TypeBuilder) {
28 TypeBuilder tb = ret as TypeBuilder;
29 //Console.WriteLine ("{0} is type builder", tb);
30 if (tb.IsCreated ()) {
31 ret = tb.CreateType ();
32 //Console.WriteLine ("resolving to created {0} {1}", ret, tb);
38 //Console.WriteLine ("looking name {0}", name);
39 IFaceEntry entry = mIncompleteIFaces [name] as IFaceEntry;
40 @@ -1164,23 +1146,26 @@ class TypeEmitter : IDisposable
43 if (method.ReturnsStruct) {
44 - //Console.WriteLine ("returns struct");
45 + // Console.WriteLine ("returns struct");
47 UnoXStructTypeDescription std = method.ReturnType as UnoXStructTypeDescription;
48 - Type[] ats = new Type [std.TypeArguments];
50 - //Console.WriteLine ("type arguments: {0}", std.TypeArguments);
52 - for (j = 0; j < std.TypeArguments; j ++) {
53 - ats [j] = GetType (std.TypeArgument (j));
54 - //Console.WriteLine ("ats [{0}] = {1}", j, ats [j]);
56 + if (std.TypeArguments != 0) {
57 + // Console.WriteLine ("std: '{0}' '{1}' {2}", std, method.ReturnType, method.ReturnType.Name);
58 + Type[] ats = new Type [std.TypeArguments];
60 + // Console.WriteLine ("type arguments: {0}", std.TypeArguments);
62 + for (j = 0; j < std.TypeArguments; j ++) {
63 + ats [j] = GetType (std.TypeArgument (j));
64 + //Console.WriteLine ("ats [{0}] = {1}", j, ats [j]);
67 - object[] atso = { ats };
68 - Type[] ctor = { typeof (Type[]) };
69 - attrBuilder = new CustomAttributeBuilder (typeof (uno.TypeArgumentsAttribute).GetConstructor (ctor),
70 + object[] atso = { ats };
71 + Type[] ctor = { typeof (Type[]) };
72 + attrBuilder = new CustomAttributeBuilder (typeof (uno.TypeArgumentsAttribute).GetConstructor (ctor),
74 - methodBuilder.SetCustomAttribute (attrBuilder);
75 + methodBuilder.SetCustomAttribute (attrBuilder);
79 // define UNO exception attribute (exceptions) --------------------------------------
80 @@ -2051,7 +2036,7 @@ class UnoXTypeDescription : UnoObject
84 - return cmm_x_type_description_get_name (mHandle);
85 + return Marshal.PtrToStringAnsi (cmm_x_type_description_get_name (mHandle));
89 @@ -2064,7 +2049,7 @@ class UnoXTypeDescription : UnoObject
92 [DllImport("climaker")]
93 - private static extern string cmm_x_type_description_get_name (IntPtr handle);
94 + private static extern IntPtr cmm_x_type_description_get_name (IntPtr handle);
96 [DllImport("climaker")]
97 private static extern UnoTypeClass cmm_x_type_description_get_type_class (IntPtr handle);
98 @@ -2086,7 +2071,7 @@ class UnoXEnumTypeDescription : UnoXType
100 public string ValueName (int idx)
102 - return cmm_x_enum_type_description_get_name (mHandle, idx);
103 + return Marshal.PtrToStringAnsi (cmm_x_enum_type_description_get_name (mHandle, idx));
106 public int Value (int idx)
107 @@ -2101,7 +2086,7 @@ class UnoXEnumTypeDescription : UnoXType
108 private static extern int cmm_x_enum_type_description_get_value (IntPtr handle, int idx);
110 [DllImport("climaker")]
111 - private static extern string cmm_x_enum_type_description_get_name (IntPtr handle, int idx);
112 + private static extern IntPtr cmm_x_enum_type_description_get_name (IntPtr handle, int idx);
115 class UnoXInterfaceTypeDescription : UnoXTypeDescription
116 @@ -2175,12 +2160,12 @@ class UnoXInterfaceMemberTypeDescription
120 - return cmm_x_interface_member_type_description_get_member_name (mHandle);
121 + return Marshal.PtrToStringAnsi (cmm_x_interface_member_type_description_get_member_name (mHandle));
125 [DllImport("climaker")]
126 - private static extern string cmm_x_interface_member_type_description_get_member_name (IntPtr handle);
127 + private static extern IntPtr cmm_x_interface_member_type_description_get_member_name (IntPtr handle);
130 class UnoXInterfaceAttributeTypeDescription : UnoXInterfaceMemberTypeDescription
131 @@ -2262,10 +2247,10 @@ class UnoXInterfaceAttributeTypeDescript
132 [DllImport("climaker")]
133 private static extern IntPtr cmm_x_interface_attribute_type_description_get_type (IntPtr handle);
135 - [DllImport("climaker")]
136 + [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
137 private static extern bool cmm_x_interface_attribute_type_description_is_bound (IntPtr handle);
139 - [DllImport("climaker")]
140 + [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
141 private static extern bool cmm_x_interface_attribute_type_description_is_read_only (IntPtr handle);
143 [DllImport("climaker")]
144 @@ -2389,10 +2374,10 @@ class UnoXInterfaceMethodTypeDescription
145 [DllImport("climaker")]
146 private static extern IntPtr cmm_x_interface_method_type_description_get_return_type (IntPtr handle);
148 - [DllImport("climaker")]
149 + [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
150 private static extern bool cmm_x_interface_method_type_description_returns_struct (IntPtr handle);
152 - [DllImport("climaker")]
153 + [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
154 private static extern bool cmm_x_interface_method_type_description_is_oneway (IntPtr handle);
157 @@ -2429,7 +2414,7 @@ class UnoXCompoundTypeDescription : UnoX
158 if (idx < 0 || idx >= mMemberNames)
161 - return cmm_x_compound_type_description_get_member_name (mMemberNamesHandle, idx);
162 + return Marshal.PtrToStringAnsi (cmm_x_compound_type_description_get_member_name (mMemberNamesHandle, idx));
165 public int MemberNames
166 @@ -2475,7 +2460,7 @@ class UnoXCompoundTypeDescription : UnoX
167 private static extern int cmm_x_compound_type_description_get_member_names (IntPtr handle, out IntPtr memberNamesHandle);
169 [DllImport("climaker")]
170 - private static extern string cmm_x_compound_type_description_get_member_name (IntPtr handle, int idx);
171 + private static extern IntPtr cmm_x_compound_type_description_get_member_name (IntPtr handle, int idx);
173 [DllImport("climaker")]
174 private static extern int cmm_x_compound_type_description_get_member_types (IntPtr handle, out IntPtr memberTypesHandle);
175 @@ -2517,7 +2502,7 @@ class UnoXStructTypeDescription : UnoXCo
176 if (idx < 0 || idx >= mTypeParameters)
179 - return cmm_x_struct_type_description_get_type_parameter (mTypeParametersHandle, idx);
180 + return Marshal.PtrToStringAnsi (cmm_x_struct_type_description_get_type_parameter (mTypeParametersHandle, idx));
183 public int TypeParameters
184 @@ -2560,7 +2545,7 @@ class UnoXStructTypeDescription : UnoXCo
185 private static extern int cmm_x_struct_type_description_get_type_parameters (IntPtr handle, out IntPtr typeParametersHandle);
187 [DllImport("climaker")]
188 - private static extern string cmm_x_struct_type_description_get_type_parameter (IntPtr typeParametersHandle, int idx);
189 + private static extern IntPtr cmm_x_struct_type_description_get_type_parameter (IntPtr typeParametersHandle, int idx);
191 [DllImport("climaker")]
192 private static extern int cmm_x_struct_type_description_get_type_arguments (IntPtr handle, out IntPtr typeArgumentsHandle, out IntPtr typeArgumentsArrayHandle);
193 @@ -2595,7 +2580,7 @@ class UnoXMethodParameter : UnoObject
197 - return cmm_x_method_parameter_name (mHandle);
198 + return Marshal.PtrToStringAnsi (cmm_x_method_parameter_name (mHandle));
202 @@ -2615,17 +2600,17 @@ class UnoXMethodParameter : UnoObject
206 - [DllImport("climaker")]
207 + [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
208 private static extern bool cmm_x_method_parameter_is_out (IntPtr handle);
210 - [DllImport("climaker")]
211 + [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
212 private static extern bool cmm_x_method_parameter_is_in (IntPtr handle);
214 [DllImport("climaker")]
215 private static extern int cmm_x_method_parameter_position (IntPtr handle);
217 [DllImport("climaker")]
218 - private static extern string cmm_x_method_parameter_name (IntPtr handle);
219 + private static extern IntPtr cmm_x_method_parameter_name (IntPtr handle);
221 [DllImport("climaker")]
222 private static extern IntPtr cmm_x_method_parameter_type (IntPtr handle);
223 @@ -2645,7 +2630,7 @@ class UnoXParameter : UnoXMethodParamete
227 - [DllImport("climaker")]
228 + [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
229 private static extern bool cmm_x_parameter_is_rest (IntPtr handle);
232 @@ -2724,7 +2709,7 @@ class UnoXServiceTypeDescription : UnoXT
233 [DllImport("climaker")]
234 private static extern IntPtr cmm_x_service_type_description_get_constructor (IntPtr constructorsHandle, int idx);
236 - [DllImport("climaker")]
237 + [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
238 private static extern bool cmm_x_service_type_description_is_single_interface_based (IntPtr handle);
240 [DllImport("climaker")]
241 @@ -2756,7 +2741,7 @@ class UnoXSingletonTypeDescription : Uno
242 [DllImport("climaker")]
243 private static extern IntPtr cmm_x_singleton_type_description_get_interface (IntPtr handle);
245 - [DllImport("climaker")]
246 + [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
247 private static extern bool cmm_x_singleton_type_description_is_interface_based (IntPtr handle);
250 @@ -2777,7 +2762,7 @@ class UnoXConstantTypeDescription : UnoX
251 System.UInt16 tUInt16;
253 System.UInt32 tUInt32;
256 System.UInt64 tUInt64;
257 System.Single tFloat;
259 @@ -2824,7 +2809,7 @@ class UnoXConstantTypeDescription : UnoX
261 out Int16 tInt16, out System.UInt16 tUInt16,
262 out Int32 tInt32, out System.UInt32 tUInt32,
263 - out Int16 tInt64, out System.UInt64 tUInt64,
264 + out Int64 tInt64, out System.UInt64 tUInt64,
265 out System.Single tFloat, out double tDouble);
268 @@ -2909,7 +2894,7 @@ class UnoXServiceConstructorDescription
272 - return cmm_x_service_constructor_description_get_name (mHandle);
273 + return Marshal.PtrToStringAnsi (cmm_x_service_constructor_description_get_name (mHandle));
277 @@ -2949,9 +2934,9 @@ class UnoXServiceConstructorDescription
278 private static extern IntPtr cmm_x_service_constructor_description_get_parameter (IntPtr parametersHandle, int idx);
280 [DllImport("climaker")]
281 - private static extern string cmm_x_service_constructor_description_get_name (IntPtr handle);
282 + private static extern IntPtr cmm_x_service_constructor_description_get_name (IntPtr handle);
284 - [DllImport("climaker")]
285 + [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
286 private static extern bool cmm_x_service_constructor_description_is_default_constructor (IntPtr handle);
288 [DllImport("climaker")]
289 diff -rup cli_ure-bak/source/climaker/climaker_mono.cxx cli_ure/source/climaker/climaker_mono.cxx
290 --- cli_ure-bak/source/climaker/climaker_mono.cxx 2007-03-29 16:22:58.000000000 +0200
291 +++ cli_ure/source/climaker/climaker_mono.cxx 2007-03-29 16:25:14.000000000 +0200
292 @@ -151,7 +151,7 @@ class UnoHelper
293 Reference< XInterface > mxTD_provider;
294 Reference< reflection::XTypeDescriptionEnumeration > mxTD_enum;
295 Reference< reflection::XTypeDescription > mxTD;
299 vector< OUString > mMandatoryRegistries;
300 vector< OUString > mExtraRegistries;
301 @@ -1001,7 +1001,7 @@ extern "C" {
303 sal_Int16 *tInt16, sal_uInt16 *tUInt16,
304 sal_Int32 *tInt32, sal_uInt32 *tUInt32,
305 - sal_Int16 *tInt64, sal_uInt64 *tUInt64,
306 + sal_Int64 *tInt64, sal_uInt64 *tUInt64,
307 float *tFloat, double *tDouble)
309 reflection::XConstantTypeDescription* xtd = (reflection::XConstantTypeDescription*) ptr;