diff options
author | Grant Gayed | 2003-07-14 20:15:07 +0000 |
---|---|---|
committer | Grant Gayed | 2003-07-14 20:15:07 +0000 |
commit | bc4bf54199fcc5ae0afa1714b8e0bc6ede0464e5 (patch) | |
tree | c2a777d2bde1a1db7225687e6854555762464a85 /bundles | |
parent | 4868927bd275130c538c2b7a0fe8f1cbcc0f59a0 (diff) | |
download | eclipse.platform.swt-bc4bf54199fcc5ae0afa1714b8e0bc6ede0464e5.tar.gz eclipse.platform.swt-bc4bf54199fcc5ae0afa1714b8e0bc6ede0464e5.tar.xz eclipse.platform.swt-bc4bf54199fcc5ae0afa1714b8e0bc6ede0464e5.zip |
*** empty log message ***
Diffstat (limited to 'bundles')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java index 0c691acd43..872dc1f404 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java @@ -27,7 +27,6 @@ public class AccessibleObject { int descriptionPtr = -1; int keybindingPtr = -1; int namePtr = -1; - int textPtr = -1; static boolean DEBUG = Display.DEBUG; AccessibleObject (int type, int widget, Accessible accessible, int parentType, boolean isLightweight) { @@ -576,11 +575,9 @@ public class AccessibleObject { start_offset = Math.min (start_offset, end_offset); text = text.substring (start_offset, end_offset); byte[] bytes = Converter.wcsToMbcs (null, text, true); -// TODO gnopernicus bug? freeing previous string can cause gp -// if (textPtr != -1) OS.g_free (textPtr); - textPtr = OS.g_malloc (bytes.length); - OS.memmove (textPtr, bytes, bytes.length); - return textPtr; + int result = OS.g_malloc (bytes.length); + OS.memmove (result, bytes, bytes.length); + return result; } if (ATK.g_type_is_a (parentType, AccessibleType.ATK_TEXT_TYPE)) { int superType = ATK.g_type_class_peek (parentType); @@ -755,11 +752,9 @@ public class AccessibleObject { OS.memmove (end_offset, new int[] {endBounds}, 4); text = text.substring (startBounds, endBounds); byte[] bytes = Converter.wcsToMbcs (null, text, true); -// TODO gnopernicus bug? freeing previous string can cause gp -// if (textPtr != -1) OS.g_free (textPtr); - textPtr = OS.g_malloc (bytes.length); - OS.memmove (textPtr, bytes, bytes.length); - return textPtr; + int result = OS.g_malloc (bytes.length); + OS.memmove (result, bytes, bytes.length); + return result; } if (ATK.g_type_is_a (parentType, AccessibleType.ATK_TEXT_TYPE)) { int superType = ATK.g_type_class_peek (parentType); @@ -877,11 +872,9 @@ public class AccessibleObject { OS.memmove (end_offset, new int[] {endBounds}, 4); text = text.substring (startBounds, endBounds); byte[] bytes = Converter.wcsToMbcs (null, text, true); -// TODO gnopernicus bug? freeing previous string can cause gp -// if (textPtr != -1) OS.g_free (textPtr); - textPtr = OS.g_malloc (bytes.length); - OS.memmove (textPtr, bytes, bytes.length); - return textPtr; + int result = OS.g_malloc (bytes.length); + OS.memmove (result, bytes, bytes.length); + return result; } if (ATK.g_type_is_a (parentType, AccessibleType.ATK_TEXT_TYPE)) { int superType = ATK.g_type_class_peek (parentType); @@ -1004,11 +997,9 @@ public class AccessibleObject { OS.memmove (end_offset, new int[] {endBounds}, 4); text = text.substring (startBounds, endBounds); byte[] bytes = Converter.wcsToMbcs (null, text, true); -// TODO gnopernicus bug? freeing previous string can cause gp -// if (textPtr != -1) OS.g_free (textPtr); - textPtr = OS.g_malloc (bytes.length); - OS.memmove (textPtr, bytes, bytes.length); - return textPtr; + int result = OS.g_malloc (bytes.length); + OS.memmove (result, bytes, bytes.length); + return result; } if (ATK.g_type_is_a (parentType, AccessibleType.ATK_TEXT_TYPE)) { int superType = ATK.g_type_class_peek (parentType); @@ -1037,8 +1028,6 @@ public class AccessibleObject { keybindingPtr = -1; if (actionNamePtr != -1) OS.g_free (actionNamePtr); actionNamePtr = -1; - if (textPtr != -1) OS.g_free (textPtr); - textPtr = -1; } AccessibleObject getChildByHandle (int handle) { |