evolution-sharp r173 - in branches/EVOLUTION_SHARP_0_16_0: . evolution/src
- From: jjohnny svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-sharp r173 - in branches/EVOLUTION_SHARP_0_16_0: . evolution/src
- Date: Tue, 29 Apr 2008 15:45:48 +0100 (BST)
Author: jjohnny
Date: Tue Apr 29 14:45:47 2008
New Revision: 173
URL: http://svn.gnome.org/viewvc/evolution-sharp?rev=173&view=rev
Log:
Fix for #519284. Tell GC not to free const char*. Fixed Uid & Location properties
Modified:
branches/EVOLUTION_SHARP_0_16_0/ChangeLog
branches/EVOLUTION_SHARP_0_16_0/evolution/src/CalComponent.cs
Modified: branches/EVOLUTION_SHARP_0_16_0/evolution/src/CalComponent.cs
==============================================================================
--- branches/EVOLUTION_SHARP_0_16_0/evolution/src/CalComponent.cs (original)
+++ branches/EVOLUTION_SHARP_0_16_0/evolution/src/CalComponent.cs Tue Apr 29 14:45:47 2008
@@ -181,15 +181,17 @@
}
[DllImport("ecal")]
- static extern void e_cal_component_get_uid (IntPtr handle, out string uid);
+ static extern void e_cal_component_get_uid (IntPtr handle, out IntPtr uid);
[DllImport("ecal")]
static extern void e_cal_component_set_uid (IntPtr handle, string uid);
public string Uid {
get {
- string uid = "";
- e_cal_component_get_uid (Handle, out uid);
- return uid;
+ IntPtr uid;
+ e_cal_component_get_uid (Handle, out uid);
+ string managed_uid = Marshal.PtrToStringAnsi (uid);
+
+ return managed_uid;
}
set {
e_cal_component_set_uid (Handle, value);
@@ -271,15 +273,17 @@
}
[DllImport("ecal")]
- static extern void e_cal_component_get_location (IntPtr raw, out string location);
+ static extern void e_cal_component_get_location (IntPtr raw, out IntPtr location);
[DllImport("ecal")]
static extern void e_cal_component_set_location (IntPtr raw, string location);
public string Location {
get {
- string location = "";
+ IntPtr location;
e_cal_component_get_location (Handle, out location);
- return location;
+ string managed_location = Marshal.PtrToStringAnsi (location);
+
+ return managed_location;
}
set {
e_cal_component_set_location (Handle, value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]